import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
} Main public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} catch (Exception e) {
			// TODO: handle exception
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} catch (Exception e) {
			// TODO: handle exception
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} catch (Exception e) {
			// TODO: handle exception
		} catch (Exception e) {
			// TODO: handle exception
		} Exception e {
			// TODO: handle exception
		} {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} int a = Integer.parseInt(br.readLine()); a Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int b = Integer.parseInt(br.readLine()); b Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int c = Integer.parseInt(br.readLine()); c Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int x = Integer.parseInt(br.readLine()); x Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int answer = 0; answer 0 for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			} int i = 0; int i = 0; i 0 i < a + 1 i a + 1 a 1 i++ i++ i {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			} {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			} for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				} int j = 0; int j = 0; j 0 j < b + 1 j b + 1 b 1 j++ j++ j {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				} {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				} for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					} int  k = 0; int  k = 0; k 0 k < c + 1 k c + 1 c 1 k++ k++ k {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					} {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					} 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) {
							answer++;
						} sum == x sum x {
							answer++;
						} answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
} public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			int a = Integer.parseInt(br.readLine());
			int b = Integer.parseInt(br.readLine());
			int c = Integer.parseInt(br.readLine());
			int x = Integer.parseInt(br.readLine());
			int answer = 0;

			for (int i = 0; i < a + 1; i++) {
				for (int j = 0; j < b + 1; j++) {
					for (int  k = 0;  k < c + 1;  k++) {

						int sum = 500*i + 100*j + 50*k;
						if (sum == x) {
							answer++;
						}
					}
				}
			}
			System.out.println(answer);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}