import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(); // 500円玉枚数
		int b = sc.nextInt(); // 100円玉枚数
		int c = sc.nextInt(); // 50円玉枚数
		int x = sc.nextInt(); // 合計金額

		int result = 0;

		for (int cntA = 0; cntA <= a; cntA++) {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		}

		System.out.println(result);
	}
}
 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(); // 500円玉枚数
		int b = sc.nextInt(); // 100円玉枚数
		int c = sc.nextInt(); // 50円玉枚数
		int x = sc.nextInt(); // 合計金額

		int result = 0;

		for (int cntA = 0; cntA <= a; cntA++) {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		}

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

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(); // 500円玉枚数
		int b = sc.nextInt(); // 100円玉枚数
		int c = sc.nextInt(); // 50円玉枚数
		int x = sc.nextInt(); // 合計金額

		int result = 0;

		for (int cntA = 0; cntA <= a; cntA++) {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		}

		System.out.println(result);
	} main {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(); // 500円玉枚数
		int b = sc.nextInt(); // 100円玉枚数
		int c = sc.nextInt(); // 50円玉枚数
		int x = sc.nextInt(); // 合計金額

		int result = 0;

		for (int cntA = 0; cntA <= a; cntA++) {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		}

		System.out.println(result);
	} 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 int result = 0; result 0 for (int cntA = 0; cntA <= a; cntA++) {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		} int cntA = 0; int cntA = 0; cntA 0 cntA <= a cntA a cntA++ cntA++ cntA {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		} {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		} for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			} int cntB = 0; int cntB = 0; cntB 0 cntB <= b cntB b cntB++ cntB++ cntB {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			} {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			} for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				} int cntC = 0; int cntC = 0; cntC 0 cntC <= c cntC c cntC++ cntC++ cntC {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				} {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				} if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					} (500*cntA) + (100*cntB) + (50*cntC) == x (500*cntA) + (100*cntB) + (50*cntC) (500*cntA) + (100*cntB) + (50*cntC) (500*cntA) 500 cntA (100*cntB) 100 cntB (50*cntC) 50 cntC x {
						result++;
					} result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(); // 500円玉枚数
		int b = sc.nextInt(); // 100円玉枚数
		int c = sc.nextInt(); // 50円玉枚数
		int x = sc.nextInt(); // 合計金額

		int result = 0;

		for (int cntA = 0; cntA <= a; cntA++) {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		}

		System.out.println(result);
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(); // 500円玉枚数
		int b = sc.nextInt(); // 100円玉枚数
		int c = sc.nextInt(); // 50円玉枚数
		int x = sc.nextInt(); // 合計金額

		int result = 0;

		for (int cntA = 0; cntA <= a; cntA++) {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		}

		System.out.println(result);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(); // 500円玉枚数
		int b = sc.nextInt(); // 100円玉枚数
		int c = sc.nextInt(); // 50円玉枚数
		int x = sc.nextInt(); // 合計金額

		int result = 0;

		for (int cntA = 0; cntA <= a; cntA++) {
			for (int cntB = 0; cntB <= b; cntB++) {
				for (int cntC = 0; cntC <= c; cntC++) {
					if ((500*cntA) + (100*cntB) + (50*cntC) == x) {
						result++;
					};
				}
			}
		}

		System.out.println(result);
	}
}

