import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = Integer.parseInt(scanner.nextLine()); // 500
        int b = Integer.parseInt(scanner.nextLine()); // 100
        int c = Integer.parseInt(scanner.nextLine()); //  50
        int x = Integer.parseInt(scanner.nextLine());

        int answer = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
        scanner.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = Integer.parseInt(scanner.nextLine()); // 500
        int b = Integer.parseInt(scanner.nextLine()); // 100
        int c = Integer.parseInt(scanner.nextLine()); //  50
        int x = Integer.parseInt(scanner.nextLine());

        int answer = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
        scanner.close();
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = Integer.parseInt(scanner.nextLine()); // 500
        int b = Integer.parseInt(scanner.nextLine()); // 100
        int c = Integer.parseInt(scanner.nextLine()); //  50
        int x = Integer.parseInt(scanner.nextLine());

        int answer = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
        scanner.close();
    } main {
        Scanner scanner = new Scanner(System.in);
        int a = Integer.parseInt(scanner.nextLine()); // 500
        int b = Integer.parseInt(scanner.nextLine()); // 100
        int c = Integer.parseInt(scanner.nextLine()); //  50
        int x = Integer.parseInt(scanner.nextLine());

        int answer = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
        scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = Integer.parseInt(scanner.nextLine()); a Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner int b = Integer.parseInt(scanner.nextLine()); b Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner int c = Integer.parseInt(scanner.nextLine()); c Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner int x = Integer.parseInt(scanner.nextLine()); x Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner int answer = 0; answer 0 for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        } 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 (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        } {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        } for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= b j b j++ j++ j {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            } {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            } for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                } int k = 0; int k = 0; k 0 k <= c k c k++ k++ k {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                } {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                } if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    } i * 500 + j * 100 + k * 50 == x i * 500 + j * 100 + k * 50 i * 500 + j * 100 + k * 50 i * 500 i 500 j * 100 j 100 k * 50 k 50 x {
                        answer++;
                    } answer++ answer System.out.println(answer) System.out.println System.out System System.out answer scanner.close() scanner.close scanner String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = Integer.parseInt(scanner.nextLine()); // 500
        int b = Integer.parseInt(scanner.nextLine()); // 100
        int c = Integer.parseInt(scanner.nextLine()); //  50
        int x = Integer.parseInt(scanner.nextLine());

        int answer = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
        scanner.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = Integer.parseInt(scanner.nextLine()); // 500
        int b = Integer.parseInt(scanner.nextLine()); // 100
        int c = Integer.parseInt(scanner.nextLine()); //  50
        int x = Integer.parseInt(scanner.nextLine());

        int answer = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
        scanner.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = Integer.parseInt(scanner.nextLine()); // 500
        int b = Integer.parseInt(scanner.nextLine()); // 100
        int c = Integer.parseInt(scanner.nextLine()); //  50
        int x = Integer.parseInt(scanner.nextLine());

        int answer = 0;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                for (int k = 0; k <= c; k++) {
                    if (i * 500 + j * 100 + k * 50 == x) {
                        answer++;
                    }
                }
            }
        }

        System.out.println(answer);
        scanner.close();
    }
}
