import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        }
    }
} Main public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        }
    } try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        } {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) int A = in.nextInt(); A in.nextInt() in.nextInt in int B = in.nextInt(); B in.nextInt() in.nextInt in int C = in.nextInt(); C in.nextInt() in.nextInt in int X = in.nextInt(); X in.nextInt() in.nextInt in int count = 0; count 0 for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            } int a500 = 0; int a500 = 0; a500 0 a500 <= A a500 A a500++ a500++ a500 {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            } {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            } for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                } int b100 = 0; int b100 = 0; b100 0 b100 <= B b100 B b100++ b100++ b100 {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                } {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                } for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    } int c50 = 0; int c50 = 0; c50 0 c50 <= C c50 C c50++ c50++ c50 {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    } {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    } if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        } 500 * a500 + 100 * b100 + 50 * c50 == X 500 * a500 + 100 * b100 + 50 * c50 500 * a500 + 100 * b100 + 50 * c50 500 * a500 500 a500 100 * b100 100 b100 50 * c50 50 c50 X {
                            count++;
                        } count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        }
    }
} public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int count = 0;
            for (int a500 = 0; a500 <= A; a500++) {
                for (int b100 = 0; b100 <= B; b100++) {
                    for (int c50 = 0; c50 <= C; c50++) {
                        if (500 * a500 + 100 * b100 + 50 * c50 == X) {
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
        }
    }
}
