import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.nextLine());
        int B = Integer.parseInt(sc.nextLine());
        int C = Integer.parseInt(sc.nextLine());
        int X = Integer.parseInt(sc.nextLine());

        int ans = 0;
        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.nextLine());
        int B = Integer.parseInt(sc.nextLine());
        int C = Integer.parseInt(sc.nextLine());
        int X = Integer.parseInt(sc.nextLine());

        int ans = 0;
        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.nextLine());
        int B = Integer.parseInt(sc.nextLine());
        int C = Integer.parseInt(sc.nextLine());
        int X = Integer.parseInt(sc.nextLine());

        int ans = 0;
        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.nextLine());
        int B = Integer.parseInt(sc.nextLine());
        int C = Integer.parseInt(sc.nextLine());
        int X = Integer.parseInt(sc.nextLine());

        int ans = 0;
        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = Integer.parseInt(sc.nextLine()); A Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int B = Integer.parseInt(sc.nextLine()); B Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int C = Integer.parseInt(sc.nextLine()); C Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int X = Integer.parseInt(sc.nextLine()); X Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int ans = 0; ans 0 for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        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 j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        } {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        } for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= B j B j++ j++ j {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            } {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            } for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                } int j2 = 0; int j2 = 0; j2 0 j2 <= C j2 C j2++ j2++ j2 {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                } {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                } int sum = i * 500 + j * 100 + j2 * 50; sum i * 500 + j * 100 + j2 * 50 i * 500 + j * 100 + j2 * 50 i * 500 i 500 j * 100 j 100 j2 * 50 j2 50 if (sum == X) {
                        ans++;
                    } sum == X sum X {
                        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) {
        Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.nextLine());
        int B = Integer.parseInt(sc.nextLine());
        int C = Integer.parseInt(sc.nextLine());
        int X = Integer.parseInt(sc.nextLine());

        int ans = 0;
        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.nextLine());
        int B = Integer.parseInt(sc.nextLine());
        int C = Integer.parseInt(sc.nextLine());
        int X = Integer.parseInt(sc.nextLine());

        int ans = 0;
        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = Integer.parseInt(sc.nextLine());
        int B = Integer.parseInt(sc.nextLine());
        int C = Integer.parseInt(sc.nextLine());
        int X = Integer.parseInt(sc.nextLine());

        int ans = 0;
        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int j2 = 0; j2 <= C; j2++) {
                    int sum = i * 500 + j * 100 + j2 * 50;
                    if (sum == X) {
                        ans++;
                    }
                }
            }
        }
        System.out.println(ans);
    }
}
