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 ans = 0;

		for(int i = 0; i <= A; i++) {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		}

		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();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int ans = 0;

		for(int i = 0; i <= A; i++) {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		}

		System.out.println(ans);
	}

} 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 ans = 0;

		for(int i = 0; i <= A; i++) {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		}

		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int ans = 0;

		for(int i = 0; i <= A; i++) {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		}

		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 ans = 0; ans 0 for(int i = 0; i <= A; i++) {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i <= A i A i++ i++ i {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		} {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		} if(500 * i > X) {
				break;
			} 500 * i > X 500 * i 500 i X {
				break;
			} break; for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			} int j = 0; int j = 0; j 0 j <= B j B j++ j++ j {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			} {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			} if(500 * i + 100 * j > X) {
					break;
				} 500 * i + 100 * j > X 500 * i + 100 * j 500 * i 500 i 100 * j 100 j X {
					break;
				} break; for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				} int k = 0; int k = 0; k 0 k <= C k C k++ k++ k {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				} {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				} if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					} 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 {
						ans++;
					} ans++ ans if(500 * i + 100 * j + 50 * k > X) {
						break;
					} 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 {
						break;
					} break; 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();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int ans = 0;

		for(int i = 0; i <= A; i++) {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		}

		System.out.println(ans);
	}

} 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 ans = 0;

		for(int i = 0; i <= A; i++) {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		}

		System.out.println(ans);
	}

} 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 ans = 0;

		for(int i = 0; i <= A; i++) {
			if(500 * i > X) {
				break;
			}
			for(int j = 0; j <= B; j++) {
				if(500 * i + 100 * j > X) {
					break;
				}
				for(int k = 0; k <= C; k++) {
					if(500 * i + 100 * j + 50 * k == X) {
						ans++;
					}else if(500 * i + 100 * j + 50 * k > X) {
						break;
					}
				}
			}
		}

		System.out.println(ans);
	}

}
