import java.util.Scanner;

public class Main {

    public static void main(final String[] args) {
        try(final Scanner scanner = new Scanner(System.in);) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(final String[] args) {
        try(final Scanner scanner = new Scanner(System.in);) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        }
    }
} Main public static void main(final String[] args) {
        try(final Scanner scanner = new Scanner(System.in);) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        }
    } main {
        try(final Scanner scanner = new Scanner(System.in);) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        }
    } try(final Scanner scanner = new Scanner(System.in);) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        } {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        } final Scanner scanner = new Scanner(System.in) final Scanner scanner = new Scanner(System.in) new Scanner(System.in) final int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner final int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner final int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner final int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int cnt = 0; cnt 0 for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            } int aCnt = 0; int aCnt = 0; aCnt 0 aCnt <= a aCnt a aCnt++ aCnt++ aCnt {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            } {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            } for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                } int bCnt = 0; int bCnt = 0; bCnt 0 bCnt <= b bCnt b bCnt++ bCnt++ bCnt {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                } {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                } if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    } ((aCnt * 500) + (bCnt * 100)) > x ((aCnt * 500) + (bCnt * 100)) (aCnt * 500) aCnt 500 (bCnt * 100) bCnt 100 x {
                        break;
                    } break; for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    } int cCnt = 0; int cCnt = 0; cCnt 0 cCnt <= c cCnt c cCnt++ cCnt++ cCnt {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    } {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    } if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        } ((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x ((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) (aCnt * 500) + (bCnt * 100) + (cCnt * 50) (aCnt * 500) aCnt 500 (bCnt * 100) bCnt 100 (cCnt * 50) cCnt 50 x {
                            cnt++;
                        } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt final String[] args args public class Main {

    public static void main(final String[] args) {
        try(final Scanner scanner = new Scanner(System.in);) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        }
    }
} public class Main {

    public static void main(final String[] args) {
        try(final Scanner scanner = new Scanner(System.in);) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(final String[] args) {
        try(final Scanner scanner = new Scanner(System.in);) {
            final int a = scanner.nextInt();
            final int b = scanner.nextInt();
            final int c = scanner.nextInt();
            final int x = scanner.nextInt();

            int cnt = 0;
            for (int aCnt = 0; aCnt <= a; aCnt++) {
                for (int bCnt = 0; bCnt <= b; bCnt++) {
                    if (((aCnt * 500) + (bCnt * 100)) > x) {
                        break;
                    }
                    for (int cCnt = 0; cCnt <= c; cCnt++) {
                        if (((aCnt * 500) + (bCnt * 100) + (cCnt * 50)) == x) {
                            cnt++;
                        }
                    }
                }
            }
            System.out.println(cnt);

        }
    }
}