
import java.util.Scanner;

public class Main {

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

		for (int i = 0; i < a + 1; i++) {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		}

		System.out.println(num);
	}

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

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

		for (int i = 0; i < a + 1; i++) {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		}

		System.out.println(num);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int num = 0;
		int money = 0;
		int money1 = 0;
		int money2 = 0;
		int money3 = 0;

		for (int i = 0; i < a + 1; i++) {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		}

		System.out.println(num);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
		int num = 0;
		int money = 0;
		int money1 = 0;
		int money2 = 0;
		int money3 = 0;

		for (int i = 0; i < a + 1; i++) {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		}

		System.out.println(num);
	} 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 num = 0; num 0 int money = 0; money 0 int money1 = 0; money1 0 int money2 = 0; money2 0 int money3 = 0; money3 0 for (int i = 0; i < a + 1; i++) {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		} int i = 0; int i = 0; i 0 i < a + 1 i a + 1 a 1 i++ i++ i {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		} {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		} money1 = i * 500 money1 i * 500 i 500 money = money +money1 money money +money1 money money1 for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			} int j = 0; int j = 0; j 0 j < b + 1 j b + 1 b 1 j++ j++ j {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			} {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			} money2 = j * 100 money2 j * 100 j 100 money = money1 + money2 money money1 + money2 money1 money2 for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				} int k = 0; int k = 0; k 0 k < c + 1 k c + 1 c 1 k++ k++ k {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				} {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				} money3 = k * 50 money3 k * 50 k 50 money = money1 + money2 + money3 money money1 + money2 + money3 money1 + money2 + money3 money1 money2 money3 if (money == x) {
						num++;
					} money == x money x {
						num++;
					} num++ num money = 0 money 0 System.out.println(num) System.out.println System.out System System.out num String[] args args public class Main {

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

		for (int i = 0; i < a + 1; i++) {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		}

		System.out.println(num);
	}

} public class Main {

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

		for (int i = 0; i < a + 1; i++) {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		}

		System.out.println(num);
	}

} Main

import java.util.Scanner;

public class Main {

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

		for (int i = 0; i < a + 1; i++) {
			money1 = i * 500;
			money = money +money1;
			for (int j = 0; j < b + 1; j++) {
				money2 = j * 100;
				money = money1 + money2;
				for (int k = 0; k < c + 1; k++) {
					money3 = k * 50;
					money = money1 + money2 + money3;
					if (money == x) {
						num++;
					}
					money = 0;
				}
			}
		}

		System.out.println(num);
	}

}
