import java.util.Scanner;

public class Main {
    public static void main(String args[]) throws Exception {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int sum = s.nextInt();
        int ans = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) throws Exception {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int sum = s.nextInt();
        int ans = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String args[]) throws Exception {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int sum = s.nextInt();
        int ans = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    } main {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int sum = s.nextInt();
        int ans = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int a = s.nextInt(); a s.nextInt() s.nextInt s int b = s.nextInt(); b s.nextInt() s.nextInt s int c = s.nextInt(); c s.nextInt() s.nextInt s int sum = s.nextInt(); sum s.nextInt() s.nextInt s int ans = 0; ans 0 for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        } {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        } for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= b j b j++ j++ j {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            } {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            } for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                } int k = 0; int k = 0; k 0 k <= c k c k++ k++ k {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                } {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                } if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    } 500 * i + 100 * j + 50 * k == sum 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k sum {
                        ans++;
                    } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {
    public static void main(String args[]) throws Exception {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int sum = s.nextInt();
        int ans = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String args[]) throws Exception {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int sum = s.nextInt();
        int ans = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) throws Exception {
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int sum = s.nextInt();
        int ans = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (500 * i + 100 * j + 50 * k == sum) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
}