import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int a = 0; a <= A; a++) {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int a = 0; a <= A; a++) {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int a = 0; a <= A; a++) {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int a = 0; a <= A; a++) {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int C = Integer.parseInt(sc.next()); C Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int X = Integer.parseInt(sc.next()); X Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int count = 0; count 0 for(int a = 0; a <= A; a++) {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		} int a = 0; int a = 0; a 0 a <= A a A a++ a++ a {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		} {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		} for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			} int b = 0; int b = 0; b 0 b <= B b B b++ b++ b {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			} {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			} for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				} int c = 0; int c = 0; c 0 c <= C c C c++ c++ c {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				} {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				} int check = 500 * a + 100 * b + 50 * c; check 500 * a + 100 * b + 50 * c 500 * a + 100 * b + 50 * c 500 * a 500 a 100 * b 100 b 50 * c 50 c if(check == X) {
						count++;
					} check == X check X {
						count++;
					} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int a = 0; a <= A; a++) {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int a = 0; a <= A; a++) {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		int C = Integer.parseInt(sc.next());
		int X = Integer.parseInt(sc.next());
		sc.close();

		int count = 0;
		for(int a = 0; a <= A; a++) {
			for(int b = 0; b <= B; b++) {
				for(int c = 0; c <= C; c++) {

					int check = 500 * a + 100 * b + 50 * c;
					if(check == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	}
}