import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BCoins solver = new BCoins();
        solver.solve(1, in, out);
        out.close();
    }

    static class BCoins {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int x = Integer.parseInt(in.next());

            int aMax = Math.min(x / 500, a);
            int bMax = Math.min(x / 100, b);
            int cMax = Math.min(x / 50, c);

            int count = 0;
            for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            }
            out.println(count);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BCoins solver = new BCoins();
        solver.solve(1, in, out);
        out.close();
    }

    static class BCoins {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int x = Integer.parseInt(in.next());

            int aMax = Math.min(x / 500, a);
            int bMax = Math.min(x / 100, b);
            int cMax = Math.min(x / 50, c);

            int count = 0;
            for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            }
            out.println(count);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BCoins solver = new BCoins();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BCoins solver = new BCoins();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) BCoins solver = new BCoins(); solver new BCoins() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BCoins {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int x = Integer.parseInt(in.next());

            int aMax = Math.min(x / 500, a);
            int bMax = Math.min(x / 100, b);
            int cMax = Math.min(x / 50, c);

            int count = 0;
            for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            }
            out.println(count);
        }

    } BCoins public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int x = Integer.parseInt(in.next());

            int aMax = Math.min(x / 500, a);
            int bMax = Math.min(x / 100, b);
            int cMax = Math.min(x / 50, c);

            int count = 0;
            for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            }
            out.println(count);
        } solve {
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int x = Integer.parseInt(in.next());

            int aMax = Math.min(x / 500, a);
            int bMax = Math.min(x / 100, b);
            int cMax = Math.min(x / 50, c);

            int count = 0;
            for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            }
            out.println(count);
        } int a = Integer.parseInt(in.next()); a Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int b = Integer.parseInt(in.next()); b Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int c = Integer.parseInt(in.next()); c Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int x = Integer.parseInt(in.next()); x Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int aMax = Math.min(x / 500, a); aMax Math.min(x / 500, a) Math.min Math x / 500 x 500 a int bMax = Math.min(x / 100, b); bMax Math.min(x / 100, b) Math.min Math x / 100 x 100 b int cMax = Math.min(x / 50, c); cMax Math.min(x / 50, c) Math.min Math x / 50 x 50 c int count = 0; count 0 for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            } int i = 0; int i = 0; i 0 i <= aMax i aMax i++ i++ i {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            } {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            } for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                } int j = 0; int j = 0; j 0 j <= bMax j bMax j++ j++ j {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                } {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                } for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    } int k = 0; int k = 0; k 0 k <= cMax k cMax 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++ count out.println(count) out.println out count int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BCoins solver = new BCoins();
        solver.solve(1, in, out);
        out.close();
    }

    static class BCoins {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int x = Integer.parseInt(in.next());

            int aMax = Math.min(x / 500, a);
            int bMax = Math.min(x / 100, b);
            int cMax = Math.min(x / 50, c);

            int count = 0;
            for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            }
            out.println(count);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BCoins solver = new BCoins();
        solver.solve(1, in, out);
        out.close();
    }

    static class BCoins {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int x = Integer.parseInt(in.next());

            int aMax = Math.min(x / 500, a);
            int bMax = Math.min(x / 100, b);
            int cMax = Math.min(x / 50, c);

            int count = 0;
            for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            }
            out.println(count);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BCoins solver = new BCoins();
        solver.solve(1, in, out);
        out.close();
    }

    static class BCoins {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int x = Integer.parseInt(in.next());

            int aMax = Math.min(x / 500, a);
            int bMax = Math.min(x / 100, b);
            int cMax = Math.min(x / 50, c);

            int count = 0;
            for (int i = 0; i <= aMax; i++) {
                for (int j = 0; j <= bMax; j++) {
                    for (int k = 0; k <= cMax; k++) {
                        if (500 * i + 100 * j + 50 * k == x) {
                            count++;
                        }
                    }
                }
            }
            out.println(count);
        }

    }
}

