import java.util.Scanner;

public 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(); // 50*n

        int count = 0;
        for (int s=0; s <= A; s++) {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public 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(); // 50*n

        int count = 0;
        for (int s=0; s <= A; s++) {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == 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(); // 50*n

        int count = 0;
        for (int s=0; s <= A; s++) {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == 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(); // 50*n

        int count = 0;
        for (int s=0; s <= A; s++) {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == 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 s=0; s <= A; s++) {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            }
        } int s=0; int s=0; s 0 s <= A s A s++ s++ s {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            }
        } {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            }
        } for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            } int t=0; int t=0; t 0 t <= B t B t++ t++ t {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            } {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            } for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                } int u=0; int u=0; u 0 u <= C u C u++ u++ u {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                } {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                } if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    } 500 * s + 100 * t + 50 * u == X 500 * s + 100 * t + 50 * u 500 * s + 100 * t + 50 * u 500 * s 500 s 100 * t 100 t 50 * u 50 u 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) {
        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(); // 50*n

        int count = 0;
        for (int s=0; s <= A; s++) {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
} public 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(); // 50*n

        int count = 0;
        for (int s=0; s <= A; s++) {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
} Main
import java.util.Scanner;

public 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(); // 50*n

        int count = 0;
        for (int s=0; s <= A; s++) {
            for (int t=0; t <= B; t++) {
                for (int u=0; u <= C; u++) {
                    if (500 * s + 100 * t + 50 * u == X) {
                        count++;
                    }
                }
            }
        }
        System.out.println(count);
    }
}