import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int num500 = stdin.nextInt();
		int num100 = stdin.nextInt();
		int num50 = stdin.nextInt();
		int value = stdin.nextInt();

		int count = 0;
		for (int i = 0; i <= num500; i++) {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		}

		System.out.println(count);
	}

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

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int num500 = stdin.nextInt();
		int num100 = stdin.nextInt();
		int num50 = stdin.nextInt();
		int value = stdin.nextInt();

		int count = 0;
		for (int i = 0; i <= num500; i++) {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		}

		System.out.println(count);
	}

} Main public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int num500 = stdin.nextInt();
		int num100 = stdin.nextInt();
		int num50 = stdin.nextInt();
		int value = stdin.nextInt();

		int count = 0;
		for (int i = 0; i <= num500; i++) {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		}

		System.out.println(count);
	} main {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int num500 = stdin.nextInt();
		int num100 = stdin.nextInt();
		int num50 = stdin.nextInt();
		int value = stdin.nextInt();

		int count = 0;
		for (int i = 0; i <= num500; i++) {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		}

		System.out.println(count);
	} @SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) int num500 = stdin.nextInt(); num500 stdin.nextInt() stdin.nextInt stdin int num100 = stdin.nextInt(); num100 stdin.nextInt() stdin.nextInt stdin int num50 = stdin.nextInt(); num50 stdin.nextInt() stdin.nextInt stdin int value = stdin.nextInt(); value stdin.nextInt() stdin.nextInt stdin int count = 0; count 0 for (int i = 0; i <= num500; i++) {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		} int i = 0; int i = 0; i 0 i <= num500 i num500 i++ i++ i {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		} {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		} int sum500 = 500 * i; sum500 500 * i 500 i if (sum500 > value) {
				break;
			} sum500 > value sum500 value {
				break;
			} break; for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			} int j = 0; int j = 0; j 0 j <= num100 j num100 j++ j++ j {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			} {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			} int sum100 = sum500 + 100 * j; sum100 sum500 + 100 * j sum500 100 * j 100 j if (sum100 > value) {
					break;
				} sum100 > value sum100 value {
					break;
				} break; int value50 = value - sum100; value50 value - sum100 value sum100 if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				} ((value50 % 50) == 0) && ((value50 / 50) <= num50) ((value50 % 50) == 0) (value50 % 50) value50 50 0 ((value50 / 50) <= num50) (value50 / 50) value50 50 num50 {
					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) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int num500 = stdin.nextInt();
		int num100 = stdin.nextInt();
		int num50 = stdin.nextInt();
		int value = stdin.nextInt();

		int count = 0;
		for (int i = 0; i <= num500; i++) {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		}

		System.out.println(count);
	}

} public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int num500 = stdin.nextInt();
		int num100 = stdin.nextInt();
		int num50 = stdin.nextInt();
		int value = stdin.nextInt();

		int count = 0;
		for (int i = 0; i <= num500; i++) {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		}

		System.out.println(count);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int num500 = stdin.nextInt();
		int num100 = stdin.nextInt();
		int num50 = stdin.nextInt();
		int value = stdin.nextInt();

		int count = 0;
		for (int i = 0; i <= num500; i++) {
			int sum500 = 500 * i;
			if (sum500 > value) {
				break;
			}

			for (int j = 0; j <= num100; j++) {
				int sum100 = sum500 + 100 * j;
				if (sum100 > value) {
					break;
				}

				int value50 = value - sum100;
				if (((value50 % 50) == 0) && ((value50 / 50) <= num50)) {
					count++;
				}
			}
		}

		System.out.println(count);
	}

}
