import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int ans = 0;
		int tmp = 0;
		int tmp2 = 0;
		for (int i = 0; i <= a; i++) {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		}

		System.out.println(ans);

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int ans = 0;
		int tmp = 0;
		int tmp2 = 0;
		for (int i = 0; i <= a; i++) {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		}

		System.out.println(ans);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int ans = 0;
		int tmp = 0;
		int tmp2 = 0;
		for (int i = 0; i <= a; i++) {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		}

		System.out.println(ans);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int ans = 0;
		int tmp = 0;
		int tmp2 = 0;
		for (int i = 0; i <= a; i++) {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		}

		System.out.println(ans);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.nextLine()); a Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int b = Integer.parseInt(sc.nextLine()); b Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int c = Integer.parseInt(sc.nextLine()); c Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int x = Integer.parseInt(sc.nextLine()); x Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int ans = 0; ans 0 int tmp = 0; tmp 0 int tmp2 = 0; tmp2 0 for (int i = 0; i <= a; i++) {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		} int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		} {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		} if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			} 500 * i <= x 500 * i 500 i x {
				tmp = x - 500 * i;
			} tmp = x - 500 * i tmp x - 500 * i x 500 * i 500 i {
				break;
			} break; for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			} int j = 0; int j = 0; j 0 j <= b j b j++ j++ j {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			} {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			} if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				} 100 * j <= tmp 100 * j 100 j tmp {
					tmp2 = tmp - 100 * j;
				} tmp2 = tmp - 100 * j tmp2 tmp - 100 * j tmp 100 * j 100 j {
					break;
				} break; if (tmp2 / 50 <= c) {
					ans++;
				} tmp2 / 50 <= c tmp2 / 50 tmp2 50 c {
					ans++;
				} ans++ ans if (500 * i >= x) {
				break;
			} 500 * i >= x 500 * i 500 i x {
				break;
			} break; System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int ans = 0;
		int tmp = 0;
		int tmp2 = 0;
		for (int i = 0; i <= a; i++) {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		}

		System.out.println(ans);

		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int ans = 0;
		int tmp = 0;
		int tmp2 = 0;
		for (int i = 0; i <= a; i++) {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		}

		System.out.println(ans);

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int ans = 0;
		int tmp = 0;
		int tmp2 = 0;
		for (int i = 0; i <= a; i++) {
			if (500 * i <= x) {
				tmp = x - 500 * i;
			} else {
				break;
			}

			for (int j = 0; j <= b; j++) {
				if (100 * j <= tmp) {
					tmp2 = tmp - 100 * j;
				} else {
					break;
				}

				if (tmp2 / 50 <= c) {
					ans++;
				}

			}

			if (500 * i >= x) {
				break;
			}
		}

		System.out.println(ans);

		sc.close();
	}
}