import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		int gojyu = 50;
		int hyaku = 100;
		int gohyaku = 500;
		int count = 0;

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();

		for (int i1 = 0; i1 <= A; i1++) {

			for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			}

		}

		System.out.println(count);
		sc.close();
	}
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {

		int gojyu = 50;
		int hyaku = 100;
		int gohyaku = 500;
		int count = 0;

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();

		for (int i1 = 0; i1 <= A; i1++) {

			for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			}

		}

		System.out.println(count);
		sc.close();
	}
} Main public static void main(String[] args) {

		int gojyu = 50;
		int hyaku = 100;
		int gohyaku = 500;
		int count = 0;

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();

		for (int i1 = 0; i1 <= A; i1++) {

			for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			}

		}

		System.out.println(count);
		sc.close();
	} main {

		int gojyu = 50;
		int hyaku = 100;
		int gohyaku = 500;
		int count = 0;

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();

		for (int i1 = 0; i1 <= A; i1++) {

			for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			}

		}

		System.out.println(count);
		sc.close();
	} int gojyu = 50; gojyu 50 int hyaku = 100; hyaku 100 int gohyaku = 500; gohyaku 500 int count = 0; count 0 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 for (int i1 = 0; i1 <= A; i1++) {

			for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			}

		} int i1 = 0; int i1 = 0; i1 0 i1 <= A i1 A i1++ i1++ i1 {

			for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			}

		} {

			for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			}

		} for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			} int i2 = 0; int i2 = 0; i2 0 i2 <= B i2 B i2++ i2++ i2 {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			} {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			} for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				} int i3 = 0; int i3 = 0; i3 0 i3 <= C i3 C i3++ i3++ i3 {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				} {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				} if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					} X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0 X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) X (i3 * gojyu + i2 * hyaku + i1 * gohyaku) i3 * gojyu + i2 * hyaku + i1 * gohyaku i3 * gojyu i3 gojyu i2 * hyaku i2 hyaku i1 * gohyaku i1 gohyaku 0 {

						count++;

					} count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		int gojyu = 50;
		int hyaku = 100;
		int gohyaku = 500;
		int count = 0;

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();

		for (int i1 = 0; i1 <= A; i1++) {

			for (int i2 = 0; i2 <= B; i2++) {

				for (int i3 = 0; i3 <= C; i3++) {

					if (X - (i3 * gojyu + i2 * hyaku + i1 * gohyaku) == 0) {

						count++;

					}

				}

			}

		}

		System.out.println(count);
		sc.close();
	}
}