import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated m ethod stub
		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 = 0;
		int total_b = 0;
		int total_c = 0;
		int count = 0;
		for(int a=0; a<=A; a++) {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		}
		System.out.println(count);
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated m ethod stub
		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 = 0;
		int total_b = 0;
		int total_c = 0;
		int count = 0;
		for(int a=0; a<=A; a++) {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		}
		System.out.println(count);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated m ethod stub
		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 = 0;
		int total_b = 0;
		int total_c = 0;
		int count = 0;
		for(int a=0; a<=A; a++) {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		}
		System.out.println(count);
	} main {
		// TODO Auto-generated m ethod stub
		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 = 0;
		int total_b = 0;
		int total_c = 0;
		int count = 0;
		for(int a=0; a<=A; a++) {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		}
		System.out.println(count);
	} 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 = 0; total_a 0 int total_b = 0; total_b 0 int total_c = 0; total_c 0 int count = 0; count 0 for(int a=0; a<=A; a++) {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		} int a=0; int a=0; a 0 a<=A a A a++ a++ a {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		} {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		} total_a = a*500 total_a a*500 a 500 if(total_a > X)break; total_a > X total_a X break; for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			} int b=0; int b=0; b 0 b<=B b B b++ b++ b {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			} {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			} total_b = total_a + b*100 total_b total_a + b*100 total_a b*100 b 100 if(total_b > X)break; total_b > X total_b X break; for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				} int c=0; int c=0; c 0 c<=C c C c++ c++ c {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				} {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				} total_c = total_b + c*50 total_c total_b + c*50 total_b c*50 c 50 if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					} total_c == X total_c X {
						count++;
					} count++ count if(total_c > X) {
						break;
					} total_c > X total_c X {
						break;
					} break; System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated m ethod stub
		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 = 0;
		int total_b = 0;
		int total_c = 0;
		int count = 0;
		for(int a=0; a<=A; a++) {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		}
		System.out.println(count);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated m ethod stub
		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 = 0;
		int total_b = 0;
		int total_c = 0;
		int count = 0;
		for(int a=0; a<=A; a++) {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		}
		System.out.println(count);
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated m ethod stub
		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 = 0;
		int total_b = 0;
		int total_c = 0;
		int count = 0;
		for(int a=0; a<=A; a++) {
			total_a = a*500;
			if(total_a > X)break;
			
			for(int b=0; b<=B; b++) {
				total_b = total_a + b*100;
				if(total_b > X)break;
				
				for(int c=0; c<=C; c++) {
					total_c = total_b + c*50;
					//System.out.println("["+a+","+b+","+c+"]"+total_c);
					
					if(total_c == X) {
						count++;
					}else if(total_c > X) {
						break;
					}
					
				}
			}
		}
		System.out.println(count);
	}

} 