import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.nextLine());
        int b = Integer.parseInt(scan.nextLine());
        int c = Integer.parseInt(scan.nextLine());
        int x = Integer.parseInt(scan.nextLine());

        int res = 0;
        for (int i = 0; i <= a; i++) {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        }
        System.out.print(res);

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

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.nextLine());
        int b = Integer.parseInt(scan.nextLine());
        int c = Integer.parseInt(scan.nextLine());
        int x = Integer.parseInt(scan.nextLine());

        int res = 0;
        for (int i = 0; i <= a; i++) {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        }
        System.out.print(res);

    }
} Main public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.nextLine());
        int b = Integer.parseInt(scan.nextLine());
        int c = Integer.parseInt(scan.nextLine());
        int x = Integer.parseInt(scan.nextLine());

        int res = 0;
        for (int i = 0; i <= a; i++) {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        }
        System.out.print(res);

    } main {

        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.nextLine());
        int b = Integer.parseInt(scan.nextLine());
        int c = Integer.parseInt(scan.nextLine());
        int x = Integer.parseInt(scan.nextLine());

        int res = 0;
        for (int i = 0; i <= a; i++) {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        }
        System.out.print(res);

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = Integer.parseInt(scan.nextLine()); a Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int b = Integer.parseInt(scan.nextLine()); b Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int c = Integer.parseInt(scan.nextLine()); c Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int x = Integer.parseInt(scan.nextLine()); x Integer.parseInt(scan.nextLine()) Integer.parseInt Integer scan.nextLine() scan.nextLine scan int res = 0; res 0 for (int i = 0; i <= a; i++) {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        } int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        } {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        } for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            } int y = 0; int y = 0; y 0 y <= b y b y++ y++ y {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            } {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            } for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                } int z=0; int z=0; z 0 z <= c z c z++ z++ z {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                } {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                } int total = 500*i + 100*y + 50*z; total 500*i + 100*y + 50*z 500*i + 100*y + 50*z 500*i 500 i 100*y 100 y 50*z 50 z if (x == total)
                        res++; x == total x total res++ res System.out.print(res) System.out.print System.out System System.out res String[] args args public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.nextLine());
        int b = Integer.parseInt(scan.nextLine());
        int c = Integer.parseInt(scan.nextLine());
        int x = Integer.parseInt(scan.nextLine());

        int res = 0;
        for (int i = 0; i <= a; i++) {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        }
        System.out.print(res);

    }
} public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.nextLine());
        int b = Integer.parseInt(scan.nextLine());
        int c = Integer.parseInt(scan.nextLine());
        int x = Integer.parseInt(scan.nextLine());

        int res = 0;
        for (int i = 0; i <= a; i++) {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        }
        System.out.print(res);

    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.nextLine());
        int b = Integer.parseInt(scan.nextLine());
        int c = Integer.parseInt(scan.nextLine());
        int x = Integer.parseInt(scan.nextLine());

        int res = 0;
        for (int i = 0; i <= a; i++) {
            for (int y = 0; y <= b; y++) {
                for (int z=0; z <= c; z++) {
                    int total = 500*i + 100*y + 50*z;
                    if (x == total)
                        res++;
                }
            }
        }
        System.out.print(res);

    }
}
