import java.util.Scanner;

public class Main {

	private static int fiveHundredCoin;

	private static int hundredCoin;

	private static int fiftyCoin;

	private static int totalFare;

	public static void main(String[] args) {

		int result = process();
		System.out.println(result);
	}

	private static int process() {

		scan();
		int combinationCount = 0;

		return count(combinationCount);
	}

	private static void scan() {

		Scanner sc = new Scanner(System.in);
		fiveHundredCoin = sc.nextInt();
		hundredCoin = sc.nextInt();
		fiftyCoin = sc.nextInt();
		totalFare = sc.nextInt();
		sc.close();
	}

	private static int count(int combinationCount) {

		int total = 0;
		for (int i = 0; i <= fiveHundredCoin; i++) {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		}

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

	private static int fiveHundredCoin;

	private static int hundredCoin;

	private static int fiftyCoin;

	private static int totalFare;

	public static void main(String[] args) {

		int result = process();
		System.out.println(result);
	}

	private static int process() {

		scan();
		int combinationCount = 0;

		return count(combinationCount);
	}

	private static void scan() {

		Scanner sc = new Scanner(System.in);
		fiveHundredCoin = sc.nextInt();
		hundredCoin = sc.nextInt();
		fiftyCoin = sc.nextInt();
		totalFare = sc.nextInt();
		sc.close();
	}

	private static int count(int combinationCount) {

		int total = 0;
		for (int i = 0; i <= fiveHundredCoin; i++) {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		}

		return combinationCount;
	}
} Main private static int fiveHundredCoin; fiveHundredCoin private static int hundredCoin; hundredCoin private static int fiftyCoin; fiftyCoin private static int totalFare; totalFare public static void main(String[] args) {

		int result = process();
		System.out.println(result);
	} main {

		int result = process();
		System.out.println(result);
	} int result = process(); result process() process System.out.println(result) System.out.println System.out System System.out result String[] args args private static int process() {

		scan();
		int combinationCount = 0;

		return count(combinationCount);
	} process {

		scan();
		int combinationCount = 0;

		return count(combinationCount);
	} scan() scan int combinationCount = 0; combinationCount 0 return count(combinationCount); count(combinationCount) count combinationCount private static void scan() {

		Scanner sc = new Scanner(System.in);
		fiveHundredCoin = sc.nextInt();
		hundredCoin = sc.nextInt();
		fiftyCoin = sc.nextInt();
		totalFare = sc.nextInt();
		sc.close();
	} scan {

		Scanner sc = new Scanner(System.in);
		fiveHundredCoin = sc.nextInt();
		hundredCoin = sc.nextInt();
		fiftyCoin = sc.nextInt();
		totalFare = sc.nextInt();
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) fiveHundredCoin = sc.nextInt() fiveHundredCoin sc.nextInt() sc.nextInt sc hundredCoin = sc.nextInt() hundredCoin sc.nextInt() sc.nextInt sc fiftyCoin = sc.nextInt() fiftyCoin sc.nextInt() sc.nextInt sc totalFare = sc.nextInt() totalFare sc.nextInt() sc.nextInt sc sc.close() sc.close sc private static int count(int combinationCount) {

		int total = 0;
		for (int i = 0; i <= fiveHundredCoin; i++) {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		}

		return combinationCount;
	} count {

		int total = 0;
		for (int i = 0; i <= fiveHundredCoin; i++) {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		}

		return combinationCount;
	} int total = 0; total 0 for (int i = 0; i <= fiveHundredCoin; i++) {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i <= fiveHundredCoin i fiveHundredCoin i++ i++ i {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		} {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		} for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			} int j = 0; int j = 0; j 0 j <= hundredCoin j hundredCoin j++ j++ j {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			} {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			} for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				} int k = 0; int k = 0; k 0 k <= fiftyCoin k fiftyCoin k++ k++ k {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				} {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				} total = (500 * i) + (100 * j) + (50 * k) total (500 * i) + (100 * j) + (50 * k) (500 * i) + (100 * j) + (50 * k) (500 * i) 500 i (100 * j) 100 j (50 * k) 50 k if (totalFare == total) {
						combinationCount++;
					} totalFare == total totalFare total {
						combinationCount++;
					} combinationCount++ combinationCount return combinationCount; combinationCount int combinationCount combinationCount public class Main {

	private static int fiveHundredCoin;

	private static int hundredCoin;

	private static int fiftyCoin;

	private static int totalFare;

	public static void main(String[] args) {

		int result = process();
		System.out.println(result);
	}

	private static int process() {

		scan();
		int combinationCount = 0;

		return count(combinationCount);
	}

	private static void scan() {

		Scanner sc = new Scanner(System.in);
		fiveHundredCoin = sc.nextInt();
		hundredCoin = sc.nextInt();
		fiftyCoin = sc.nextInt();
		totalFare = sc.nextInt();
		sc.close();
	}

	private static int count(int combinationCount) {

		int total = 0;
		for (int i = 0; i <= fiveHundredCoin; i++) {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		}

		return combinationCount;
	}
} public class Main {

	private static int fiveHundredCoin;

	private static int hundredCoin;

	private static int fiftyCoin;

	private static int totalFare;

	public static void main(String[] args) {

		int result = process();
		System.out.println(result);
	}

	private static int process() {

		scan();
		int combinationCount = 0;

		return count(combinationCount);
	}

	private static void scan() {

		Scanner sc = new Scanner(System.in);
		fiveHundredCoin = sc.nextInt();
		hundredCoin = sc.nextInt();
		fiftyCoin = sc.nextInt();
		totalFare = sc.nextInt();
		sc.close();
	}

	private static int count(int combinationCount) {

		int total = 0;
		for (int i = 0; i <= fiveHundredCoin; i++) {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		}

		return combinationCount;
	}
} Main
import java.util.Scanner;

public class Main {

	private static int fiveHundredCoin;

	private static int hundredCoin;

	private static int fiftyCoin;

	private static int totalFare;

	public static void main(String[] args) {

		int result = process();
		System.out.println(result);
	}

	private static int process() {

		scan();
		int combinationCount = 0;

		return count(combinationCount);
	}

	private static void scan() {

		Scanner sc = new Scanner(System.in);
		fiveHundredCoin = sc.nextInt();
		hundredCoin = sc.nextInt();
		fiftyCoin = sc.nextInt();
		totalFare = sc.nextInt();
		sc.close();
	}

	private static int count(int combinationCount) {

		int total = 0;
		for (int i = 0; i <= fiveHundredCoin; i++) {
			for (int j = 0; j <= hundredCoin; j++) {
				for (int k = 0; k <= fiftyCoin; k++) {
					total = (500 * i) + (100 * j) + (50 * k);

					if (totalFare == total) {
						combinationCount++;
					}
				}
			}
		}

		return combinationCount;
	}
}