import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int[] inputNumbers = new int[4];
		for (int i = 0; i < 4; i++) {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		}

		int count = 0;
		for (int i = 0; i <= inputNumbers[0]; i++) {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						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[] inputNumbers = new int[4];
		for (int i = 0; i < 4; i++) {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		}

		int count = 0;
		for (int i = 0; i <= inputNumbers[0]; i++) {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			}
		}
		System.out.println(count);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int[] inputNumbers = new int[4];
		for (int i = 0; i < 4; i++) {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		}

		int count = 0;
		for (int i = 0; i <= inputNumbers[0]; i++) {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			}
		}
		System.out.println(count);

	} main {
		Scanner sc = new Scanner(System.in);

		int[] inputNumbers = new int[4];
		for (int i = 0; i < 4; i++) {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		}

		int count = 0;
		for (int i = 0; i <= inputNumbers[0]; i++) {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			}
		}
		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] inputNumbers = new int[4]; inputNumbers new int[4] 4 for (int i = 0; i < 4; i++) {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		} {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		} inputNumbers[i] = Integer.parseInt(sc.nextLine()) inputNumbers[i] inputNumbers i Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int count = 0; count 0 for (int i = 0; i <= inputNumbers[0]; i++) {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i <= inputNumbers[0] i inputNumbers[0] inputNumbers 0 i++ i++ i {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			}
		} {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			}
		} for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			} int j = 0; int j = 0; j 0 j <= inputNumbers[1] j inputNumbers[1] inputNumbers 1 j++ j++ j {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			} {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			} for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				} int k = 0; int k = 0; k 0 k <= inputNumbers[2] k inputNumbers[2] inputNumbers 2 k++ k++ k {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				} {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				} if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					} inputNumbers[3] == 500 * i + 100 * j + 50 * k inputNumbers[3] inputNumbers 3 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k {
						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[] inputNumbers = new int[4];
		for (int i = 0; i < 4; i++) {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		}

		int count = 0;
		for (int i = 0; i <= inputNumbers[0]; i++) {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			}
		}
		System.out.println(count);

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int[] inputNumbers = new int[4];
		for (int i = 0; i < 4; i++) {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		}

		int count = 0;
		for (int i = 0; i <= inputNumbers[0]; i++) {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						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[] inputNumbers = new int[4];
		for (int i = 0; i < 4; i++) {
			inputNumbers[i] = Integer.parseInt(sc.nextLine());
		}

		int count = 0;
		for (int i = 0; i <= inputNumbers[0]; i++) {
			for (int j = 0; j <= inputNumbers[1]; j++) {
				for (int k = 0; k <= inputNumbers[2]; k++) {
					if (inputNumbers[3] == 500 * i + 100 * j + 50 * k) {
						count++;
					}
				}
			}
		}
		System.out.println(count);

	}
}