import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt(); //500
    	int B = sc.nextInt(); //100
    	int C = sc.nextInt(); //50
    	int X = sc.nextInt();
    	
    	int total_a;
    	int total_b;
    	int total_c;
    	
    	int ans = 0;
    	
    	for(int cntA = 0;cntA <= A;cntA++){
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	}
    	System.out.println(ans);
    }
}
 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(); //500
    	int B = sc.nextInt(); //100
    	int C = sc.nextInt(); //50
    	int X = sc.nextInt();
    	
    	int total_a;
    	int total_b;
    	int total_c;
    	
    	int ans = 0;
    	
    	for(int cntA = 0;cntA <= A;cntA++){
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	}
    	System.out.println(ans);
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt(); //500
    	int B = sc.nextInt(); //100
    	int C = sc.nextInt(); //50
    	int X = sc.nextInt();
    	
    	int total_a;
    	int total_b;
    	int total_c;
    	
    	int ans = 0;
    	
    	for(int cntA = 0;cntA <= A;cntA++){
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	}
    	System.out.println(ans);
    } main {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt(); //500
    	int B = sc.nextInt(); //100
    	int C = sc.nextInt(); //50
    	int X = sc.nextInt();
    	
    	int total_a;
    	int total_b;
    	int total_c;
    	
    	int ans = 0;
    	
    	for(int cntA = 0;cntA <= A;cntA++){
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	}
    	System.out.println(ans);
    } 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 int total_a; total_a int total_b; total_b int total_c; total_c int ans = 0; ans 0 for(int cntA = 0;cntA <= A;cntA++){
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	} int cntA = 0; int cntA = 0; cntA 0 cntA <= A cntA A cntA++ cntA++ cntA {
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	} {
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	} total_a = cntA * 500 total_a cntA * 500 cntA 500 if(total_a > X){
    			break;
    		} total_a > X total_a X {
    			break;
    		} break; for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		} int cntB = 0; int cntB = 0; cntB 0 cntB <= B cntB B cntB++ cntB++ cntB {
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		} {
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		} total_b = cntB * 100 total_b cntB * 100 cntB 100 if(total_a + total_b > X){
    				break;
    			} total_a + total_b > X total_a + total_b total_a total_b X {
    				break;
    			} break; for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		} int cntC = 0; int cntC = 0; cntC 0 cntC <= C cntC C cntC++ cntC++ cntC {
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		} {
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		} total_c = cntC * 50 total_c cntC * 50 cntC 50 if(total_a + total_b + total_c == X){
        				++ans;
        			} total_a + total_b + total_c == X total_a + total_b + total_c total_a + total_b + total_c total_a total_b total_c X {
        				++ans;
        			} ++ans ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt(); //500
    	int B = sc.nextInt(); //100
    	int C = sc.nextInt(); //50
    	int X = sc.nextInt();
    	
    	int total_a;
    	int total_b;
    	int total_c;
    	
    	int ans = 0;
    	
    	for(int cntA = 0;cntA <= A;cntA++){
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	}
    	System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt(); //500
    	int B = sc.nextInt(); //100
    	int C = sc.nextInt(); //50
    	int X = sc.nextInt();
    	
    	int total_a;
    	int total_b;
    	int total_c;
    	
    	int ans = 0;
    	
    	for(int cntA = 0;cntA <= A;cntA++){
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	}
    	System.out.println(ans);
    }
} Main
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt(); //500
    	int B = sc.nextInt(); //100
    	int C = sc.nextInt(); //50
    	int X = sc.nextInt();
    	
    	int total_a;
    	int total_b;
    	int total_c;
    	
    	int ans = 0;
    	
    	for(int cntA = 0;cntA <= A;cntA++){
    		total_a = cntA * 500;
    		if(total_a > X){
    			break;
    		}
    		for(int cntB = 0;cntB <= B;cntB++){
    			total_b = cntB * 100;
    			if(total_a + total_b > X){
    				break;
    			}
    			for(int cntC = 0;cntC <= C;cntC++){
        			total_c = cntC * 50;
        			if(total_a + total_b + total_c == X){
        				++ans;
        			}
        			
        		}
    		}
    	}
    	System.out.println(ans);
    }
}

