import java.util.Scanner;

public class Main {

	final static int A500 = 500;
	final static int B100 = 100;
	final static int C50 = 50;

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int count = 0;

		for (int i = 0; i <= a; i++) {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		}

		System.out.println(count);

	}

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

	final static int A500 = 500;
	final static int B100 = 100;
	final static int C50 = 50;

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int count = 0;

		for (int i = 0; i <= a; i++) {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		}

		System.out.println(count);

	}

} Main final static int A500 = 500; A500 500 final static int B100 = 100; B100 100 final static int C50 = 50; C50 50 public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int count = 0;

		for (int i = 0; i <= a; i++) {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		}

		System.out.println(count);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int count = 0;

		for (int i = 0; i <= a; i++) {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		}

		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.nextLine()); a Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int b = Integer.parseInt(sc.nextLine()); b Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int c = Integer.parseInt(sc.nextLine()); c Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int x = Integer.parseInt(sc.nextLine()); x Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int count = 0; count 0 for (int i = 0; i <= a; i++) {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		} int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		} {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		} for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			} int j = 0; int j = 0; j 0 j <= b j b j++ j++ j {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			} {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			} for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				} int k = 0; int k = 0; k 0 k <= c k c k++ k++ k {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				} {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				} if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					} x == A500 * i + B100 * j + C50 * k x A500 * i + B100 * j + C50 * k A500 * i + B100 * j + C50 * k A500 * i A500 i B100 * j B100 j C50 * k C50 k {
						count++;
					} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	final static int A500 = 500;
	final static int B100 = 100;
	final static int C50 = 50;

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int count = 0;

		for (int i = 0; i <= a; i++) {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		}

		System.out.println(count);

	}

} public class Main {

	final static int A500 = 500;
	final static int B100 = 100;
	final static int C50 = 50;

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int count = 0;

		for (int i = 0; i <= a; i++) {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		}

		System.out.println(count);

	}

} Main
import java.util.Scanner;

public class Main {

	final static int A500 = 500;
	final static int B100 = 100;
	final static int C50 = 50;

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.nextLine());
		int b = Integer.parseInt(sc.nextLine());
		int c = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());

		int count = 0;

		for (int i = 0; i <= a; i++) {
			for (int j = 0; j <= b; j++) {
				for (int k = 0; k <= c; k++) {
					if (x == A500 * i + B100 * j + C50 * k) {
						count++;
					}
				}
			}

		}

		System.out.println(count);

	}

}