import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());
        int count = 0;

        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int k = 0; k <= C; k++) {
                    if (500 * i + 100 * j + 50 * k == X)
                        count++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} import java.io.PrintWriter; PrintWriter java.io 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.next());
        int B = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());
        int count = 0;

        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int k = 0; k <= C; k++) {
                    if (500 * i + 100 * j + 50 * k == X)
                        count++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());
        int count = 0;

        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int k = 0; k <= C; k++) {
                    if (500 * i + 100 * j + 50 * k == X)
                        count++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());
        int count = 0;

        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int k = 0; k <= C; k++) {
                    if (500 * i + 100 * j + 50 * k == X)
                        count++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

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

        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int k = 0; k <= C; k++) {
                    if (500 * i + 100 * j + 50 * k == X)
                        count++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());
        int count = 0;

        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int k = 0; k <= C; k++) {
                    if (500 * i + 100 * j + 50 * k == X)
                        count++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
} Main
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());
        int C = Integer.parseInt(sc.next());
        int X = Integer.parseInt(sc.next());
        int count = 0;

        for (int i = 0; i <= A; i++) {
            for (int j = 0; j <= B; j++) {
                for (int k = 0; k <= C; k++) {
                    if (500 * i + 100 * j + 50 * k == X)
                        count++;
                }
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(count);

        sc.close();
        out.flush();
    }
}