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(calc(a,b,c,x));
    }

    public static int calc(int a, int b, int c, int x) {
        int count = 0;
        int y1 = 0;
        int y2 = 0;
        int y3 = 0;
        for (int i=0;i<=a;i++) {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        }
        return count;
    }
} 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(calc(a,b,c,x));
    }

    public static int calc(int a, int b, int c, int x) {
        int count = 0;
        int y1 = 0;
        int y2 = 0;
        int y3 = 0;
        for (int i=0;i<=a;i++) {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        }
        return count;
    }
} 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(calc(a,b,c,x));
    } 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(calc(a,b,c,x));
    } 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(calc(a,b,c,x)) System.out.println System.out System System.out calc(a,b,c,x) calc a b c x String[] args args public static int calc(int a, int b, int c, int x) {
        int count = 0;
        int y1 = 0;
        int y2 = 0;
        int y3 = 0;
        for (int i=0;i<=a;i++) {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        }
        return count;
    } calc {
        int count = 0;
        int y1 = 0;
        int y2 = 0;
        int y3 = 0;
        for (int i=0;i<=a;i++) {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        }
        return count;
    } int count = 0; count 0 int y1 = 0; y1 0 int y2 = 0; y2 0 int y3 = 0; y3 0 for (int i=0;i<=a;i++) {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        } int i=0; int i=0; i 0 i<=a i a i++ i++ i {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        } {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        } y1 = i*500 y1 i*500 i 500 for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            } int j=0; int j=0; j 0 j<=b j b j++ j++ j {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            } {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            } y2 = j*100 y2 j*100 j 100 for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                } int k=0; int k=0; k 0 k<=c k c k++ k++ k {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                } {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                } y3 = k*50 y3 k*50 k 50 if (y1+y2+y3 == x) {
                      count++;
                    } y1+y2+y3 == x y1+y2+y3 y1+y2+y3 y1 y2 y3 x {
                      count++;
                    } count++ count return count; count 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(calc(a,b,c,x));
    }

    public static int calc(int a, int b, int c, int x) {
        int count = 0;
        int y1 = 0;
        int y2 = 0;
        int y3 = 0;
        for (int i=0;i<=a;i++) {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        }
        return count;
    }
} 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(calc(a,b,c,x));
    }

    public static int calc(int a, int b, int c, int x) {
        int count = 0;
        int y1 = 0;
        int y2 = 0;
        int y3 = 0;
        for (int i=0;i<=a;i++) {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        }
        return count;
    }
} 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(calc(a,b,c,x));
    }

    public static int calc(int a, int b, int c, int x) {
        int count = 0;
        int y1 = 0;
        int y2 = 0;
        int y3 = 0;
        for (int i=0;i<=a;i++) {
            y1 = i*500;
            for (int j=0;j<=b;j++) {
                y2 = j*100;
                for (int k=0;k<=c;k++) {
                    y3 = k*50;
                    if (y1+y2+y3 == x) {
                      count++;
                    }
                }
            }
        }
        return count;
    }
}
