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();
		int count=0;
		
		for(int a = 0;a<=A;a++) {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		}
		System.out.println(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();
		int count=0;
		
		for(int a = 0;a<=A;a++) {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		}
		System.out.println(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();
		int count=0;
		
		for(int a = 0;a<=A;a++) {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		
	} main {
		
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int count=0;
		
		for(int a = 0;a<=A;a++) {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		}
		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 count=0; count 0 for(int a = 0;a<=A;a++) {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		} int a = 0; int a = 0; a 0 a<=A a A a++ a++ a {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		} {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		} if(500 * a>X) {
				break;
			} 500 * a>X 500 * a 500 a X {
				break;
			} break; for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			} int b = 0; int b = 0; b 0 b<=B b B b++ b++ b {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			} {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			} if((500 * a)+(100 * b) > X) {
					break;
				} (500 * a)+(100 * b) > X (500 * a)+(100 * b) (500 * a) 500 a (100 * b) 100 b X {
					break;
				} break; for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				} int c = 0; int c = 0; c 0 c<=C c C c++ c++ c {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				} {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				} if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					} (500 * a)+(100 * b)+(50 * c)>X (500 * a)+(100 * b)+(50 * c) (500 * a)+(100 * b)+(50 * c) (500 * a) 500 a (100 * b) 100 b (50 * c) 50 c X {
						break;
					} break; int sum =(500 * a)+(100 * b)+(50 * c); sum (500 * a)+(100 * b)+(50 * c) (500 * a)+(100 * b)+(50 * c) (500 * a) 500 a (100 * b) 100 b (50 * c) 50 c if(sum==X) {
						count++;
					} sum==X sum X {
						count++;
					} count++ count 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) {
		
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int count=0;
		
		for(int a = 0;a<=A;a++) {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		}
		System.out.println(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();
		int count=0;
		
		for(int a = 0;a<=A;a++) {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		}
		System.out.println(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();
		int count=0;
		
		for(int a = 0;a<=A;a++) {
			if(500 * a>X) {
				break;
			}
			for(int b = 0;b<=B;b++) {
				if((500 * a)+(100 * b) > X) {
					break;
				}
				for(int c = 0;c<=C;c++) {
					if((500 * a)+(100 * b)+(50 * c)>X) {
						break;
					}
					int sum =(500 * a)+(100 * b)+(50 * c);
					if(sum==X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		
	}
}