import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B, C, X;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();

		int cnt = 0;
		for (int i = 0; i <= A; i++) {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		}

		System.out.print(cnt);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B, C, X;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();

		int cnt = 0;
		for (int i = 0; i <= A; i++) {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		}

		System.out.print(cnt);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B, C, X;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();

		int cnt = 0;
		for (int i = 0; i <= A; i++) {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		}

		System.out.print(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int A, B, C, X;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();

		int cnt = 0;
		for (int i = 0; i <= A; i++) {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		}

		System.out.print(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A A B B C C X; X A = sc.nextInt() A sc.nextInt() sc.nextInt sc B = sc.nextInt() B sc.nextInt() sc.nextInt sc C = sc.nextInt() C sc.nextInt() sc.nextInt sc X = sc.nextInt() X sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 for (int i = 0; i <= A; i++) {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		} 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++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		} {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		} for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			} int j = 0; int j = 0; j 0 j <= B j B j++ j++ j {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			} {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			} for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				} int k = 0; int k = 0; k 0 k <= C k C k++ k++ k {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				} {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				} int sum = 500 * i + 100 * j + 50 * k; sum 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(sum == X) cnt++; sum == X sum X cnt++ cnt System.out.print(cnt) System.out.print System.out System System.out cnt String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B, C, X;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();

		int cnt = 0;
		for (int i = 0; i <= A; i++) {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		}

		System.out.print(cnt);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B, C, X;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();

		int cnt = 0;
		for (int i = 0; i <= A; i++) {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		}

		System.out.print(cnt);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B, C, X;
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
		X = sc.nextInt();

		int cnt = 0;
		for (int i = 0; i <= A; i++) {
			for (int j = 0; j <= B; j++) {
				for (int k = 0; k <= C; k++) {
					int sum = 500 * i + 100 * j + 50 * k;
					if(sum == X) cnt++;
				}
			}
		}

		System.out.print(cnt);
	}
}