import java.util.Scanner;

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

        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        System.out.println(solve(A, B, C, X));

        sc.close();
    }

    static int solve(int A, int B, int C, int X) {
        int result = 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) {
                        ++result;
                    }
                }
            }
        }

        return result;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        System.out.println(solve(A, B, C, X));

        sc.close();
    }

    static int solve(int A, int B, int C, int X) {
        int result = 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) {
                        ++result;
                    }
                }
            }
        }

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

        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        System.out.println(solve(A, B, C, X));

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        System.out.println(solve(A, B, C, X));

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc System.out.println(solve(A, B, C, X)) System.out.println System.out System System.out solve(A, B, C, X) solve A B C X sc.close() sc.close sc String[] args args static int solve(int A, int B, int C, int X) {
        int result = 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) {
                        ++result;
                    }
                }
            }
        }

        return result;
    } solve {
        int result = 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) {
                        ++result;
                    }
                }
            }
        }

        return result;
    } int result = 0; result 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) {
                        ++result;
                    }
                }
            }
        } 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) {
                        ++result;
                    }
                }
            }
        } {
            for (int j = 0; j <= B; ++j) {
                for (int k = 0; k <= C; ++k) {
                    if (i * 500 + j * 100 + k * 50 == X) {
                        ++result;
                    }
                }
            }
        } for (int j = 0; j <= B; ++j) {
                for (int k = 0; k <= C; ++k) {
                    if (i * 500 + j * 100 + k * 50 == X) {
                        ++result;
                    }
                }
            } 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) {
                        ++result;
                    }
                }
            } {
                for (int k = 0; k <= C; ++k) {
                    if (i * 500 + j * 100 + k * 50 == X) {
                        ++result;
                    }
                }
            } for (int k = 0; k <= C; ++k) {
                    if (i * 500 + j * 100 + k * 50 == X) {
                        ++result;
                    }
                } int k = 0; int k = 0; k 0 k <= C k C ++k ++k k {
                    if (i * 500 + j * 100 + k * 50 == X) {
                        ++result;
                    }
                } {
                    if (i * 500 + j * 100 + k * 50 == X) {
                        ++result;
                    }
                } if (i * 500 + j * 100 + k * 50 == X) {
                        ++result;
                    } 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 {
                        ++result;
                    } ++result result return result; result int A A int B B int C C int X X public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        System.out.println(solve(A, B, C, X));

        sc.close();
    }

    static int solve(int A, int B, int C, int X) {
        int result = 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) {
                        ++result;
                    }
                }
            }
        }

        return result;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        System.out.println(solve(A, B, C, X));

        sc.close();
    }

    static int solve(int A, int B, int C, int X) {
        int result = 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) {
                        ++result;
                    }
                }
            }
        }

        return result;
    }
} Main
import java.util.Scanner;

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

        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        System.out.println(solve(A, B, C, X));

        sc.close();
    }

    static int solve(int A, int B, int C, int X) {
        int result = 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) {
                        ++result;
                    }
                }
            }
        }

        return result;
    }
}