import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    // 標準入力
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    // 標準入力数値配列用
    static int[] inputval() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    }

    public static void main(String[] args) throws Exception {
	// write your code here
        int a = Integer.parseInt(br.readLine().trim());
        int b = Integer.parseInt(br.readLine().trim());
        int c = Integer.parseInt(br.readLine().trim());
        int x = Integer.parseInt(br.readLine().trim());
        int cnt = 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){
                        cnt+=1;
                    }
                }
            }
        }
        System.out.println(cnt);
    }

}
 import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    // 標準入力
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    // 標準入力数値配列用
    static int[] inputval() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    }

    public static void main(String[] args) throws Exception {
	// write your code here
        int a = Integer.parseInt(br.readLine().trim());
        int b = Integer.parseInt(br.readLine().trim());
        int c = Integer.parseInt(br.readLine().trim());
        int x = Integer.parseInt(br.readLine().trim());
        int cnt = 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){
                        cnt+=1;
                    }
                }
            }
        }
        System.out.println(cnt);
    }

} Main // 標準入力
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) // 標準入力数値配列用
    static int[] inputval() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    } inputval {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    } String[] strarray = br.readLine().trim().split(" "); strarray br.readLine().trim().split(" ") br.readLine().trim().split br.readLine().trim() br.readLine().trim br.readLine() br.readLine br " " int[] intarray = new int[strarray.length]; intarray new int[strarray.length] strarray.length strarray strarray.length for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        } int i = 0; int i = 0; i 0 i < intarray.length i intarray.length intarray intarray.length i++ i++ i {
            intarray[i] = Integer.parseInt(strarray[i]);
        } {
            intarray[i] = Integer.parseInt(strarray[i]);
        } intarray[i] = Integer.parseInt(strarray[i]) intarray[i] intarray i Integer.parseInt(strarray[i]) Integer.parseInt Integer strarray[i] strarray i return intarray; intarray public static void main(String[] args) throws Exception {
	// write your code here
        int a = Integer.parseInt(br.readLine().trim());
        int b = Integer.parseInt(br.readLine().trim());
        int c = Integer.parseInt(br.readLine().trim());
        int x = Integer.parseInt(br.readLine().trim());
        int cnt = 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){
                        cnt+=1;
                    }
                }
            }
        }
        System.out.println(cnt);
    } main {
	// write your code here
        int a = Integer.parseInt(br.readLine().trim());
        int b = Integer.parseInt(br.readLine().trim());
        int c = Integer.parseInt(br.readLine().trim());
        int x = Integer.parseInt(br.readLine().trim());
        int cnt = 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){
                        cnt+=1;
                    }
                }
            }
        }
        System.out.println(cnt);
    } int a = Integer.parseInt(br.readLine().trim()); a Integer.parseInt(br.readLine().trim()) Integer.parseInt Integer br.readLine().trim() br.readLine().trim br.readLine() br.readLine br int b = Integer.parseInt(br.readLine().trim()); b Integer.parseInt(br.readLine().trim()) Integer.parseInt Integer br.readLine().trim() br.readLine().trim br.readLine() br.readLine br int c = Integer.parseInt(br.readLine().trim()); c Integer.parseInt(br.readLine().trim()) Integer.parseInt Integer br.readLine().trim() br.readLine().trim br.readLine() br.readLine br int x = Integer.parseInt(br.readLine().trim()); x Integer.parseInt(br.readLine().trim()) Integer.parseInt Integer br.readLine().trim() br.readLine().trim br.readLine() br.readLine br int cnt = 0; cnt 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){
                        cnt+=1;
                    }
                }
            }
        } 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){
                        cnt+=1;
                    }
                }
            }
        } {
            for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    if (500 * i + 100 * j + 50 * k == x){
                        cnt+=1;
                    }
                }
            }
        } for (int j=0; j<=b; j++){
                for (int k=0; k<=c; k++){
                    if (500 * i + 100 * j + 50 * k == x){
                        cnt+=1;
                    }
                }
            } 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){
                        cnt+=1;
                    }
                }
            } {
                for (int k=0; k<=c; k++){
                    if (500 * i + 100 * j + 50 * k == x){
                        cnt+=1;
                    }
                }
            } for (int k=0; k<=c; k++){
                    if (500 * i + 100 * j + 50 * k == x){
                        cnt+=1;
                    }
                } int k=0; int k=0; k 0 k<=c k c k++ k++ k {
                    if (500 * i + 100 * j + 50 * k == x){
                        cnt+=1;
                    }
                } {
                    if (500 * i + 100 * j + 50 * k == x){
                        cnt+=1;
                    }
                } if (500 * i + 100 * j + 50 * k == x){
                        cnt+=1;
                    } 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 {
                        cnt+=1;
                    } cnt+=1 cnt 1 System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    // 標準入力
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    // 標準入力数値配列用
    static int[] inputval() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    }

    public static void main(String[] args) throws Exception {
	// write your code here
        int a = Integer.parseInt(br.readLine().trim());
        int b = Integer.parseInt(br.readLine().trim());
        int c = Integer.parseInt(br.readLine().trim());
        int x = Integer.parseInt(br.readLine().trim());
        int cnt = 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){
                        cnt+=1;
                    }
                }
            }
        }
        System.out.println(cnt);
    }

} public class Main {
    // 標準入力
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    // 標準入力数値配列用
    static int[] inputval() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    }

    public static void main(String[] args) throws Exception {
	// write your code here
        int a = Integer.parseInt(br.readLine().trim());
        int b = Integer.parseInt(br.readLine().trim());
        int c = Integer.parseInt(br.readLine().trim());
        int x = Integer.parseInt(br.readLine().trim());
        int cnt = 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){
                        cnt+=1;
                    }
                }
            }
        }
        System.out.println(cnt);
    }

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    // 標準入力
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    // 標準入力数値配列用
    static int[] inputval() throws Exception {
        String[] strarray = br.readLine().trim().split(" ");
        int[] intarray = new int[strarray.length];
        for (int i = 0; i < intarray.length; i++) {
            intarray[i] = Integer.parseInt(strarray[i]);
        }
        return intarray;
    }

    public static void main(String[] args) throws Exception {
	// write your code here
        int a = Integer.parseInt(br.readLine().trim());
        int b = Integer.parseInt(br.readLine().trim());
        int c = Integer.parseInt(br.readLine().trim());
        int x = Integer.parseInt(br.readLine().trim());
        int cnt = 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){
                        cnt+=1;
                    }
                }
            }
        }
        System.out.println(cnt);
    }

}

