import java.util.Scanner;

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

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