import java.util.Arrays;
import java.util.Scanner;

public class Main {
	
	int A = 0;
	int B = 0;
	int C = 0;
	int X = 0;
	int count = 0;
	
	void run() {
		Scanner sc = new Scanner(System.in);
		A =sc.nextInt();
		B =sc.nextInt();
		C =sc.nextInt();
		X =sc.nextInt();
		for(int i = 0; i <= A; i++) {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		sc.close();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	
	int A = 0;
	int B = 0;
	int C = 0;
	int X = 0;
	int count = 0;
	
	void run() {
		Scanner sc = new Scanner(System.in);
		A =sc.nextInt();
		B =sc.nextInt();
		C =sc.nextInt();
		X =sc.nextInt();
		for(int i = 0; i <= A; i++) {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		sc.close();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main int A = 0; A 0 int B = 0; B 0 int C = 0; C 0 int X = 0; X 0 int count = 0; count 0 void run() {
		Scanner sc = new Scanner(System.in);
		A =sc.nextInt();
		B =sc.nextInt();
		C =sc.nextInt();
		X =sc.nextInt();
		for(int i = 0; i <= A; i++) {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		A =sc.nextInt();
		B =sc.nextInt();
		C =sc.nextInt();
		X =sc.nextInt();
		for(int i = 0; i <= A; i++) {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 for(int i = 0; i <= A; i++) {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						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(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		} {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		} for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			} int j = 0; int j = 0; j 0 j <= B j B j++ j++ j {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			} {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			} for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				} int k = 0; int k = 0; k 0 k <= C k C k++ k++ k {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				} {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				} if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					} i * 500 + j * 100 + k * 50 == X i * 500 + j * 100 + k * 50 i * 500 + j * 100 + k * 50 i * 500 i 500 j * 100 j 100 k * 50 k 50 X {
						count++;
					} count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	} debug {
		System.out.println(Arrays.deepToString(o));
	} System.out.println(Arrays.deepToString(o)) System.out.println System.out System System.out Arrays.deepToString(o) Arrays.deepToString Arrays o Object... o o public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	
	int A = 0;
	int B = 0;
	int C = 0;
	int X = 0;
	int count = 0;
	
	void run() {
		Scanner sc = new Scanner(System.in);
		A =sc.nextInt();
		B =sc.nextInt();
		C =sc.nextInt();
		X =sc.nextInt();
		for(int i = 0; i <= A; i++) {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		sc.close();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
} public class Main {
	
	int A = 0;
	int B = 0;
	int C = 0;
	int X = 0;
	int count = 0;
	
	void run() {
		Scanner sc = new Scanner(System.in);
		A =sc.nextInt();
		B =sc.nextInt();
		C =sc.nextInt();
		X =sc.nextInt();
		for(int i = 0; i <= A; i++) {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		sc.close();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	
	int A = 0;
	int B = 0;
	int C = 0;
	int X = 0;
	int count = 0;
	
	void run() {
		Scanner sc = new Scanner(System.in);
		A =sc.nextInt();
		B =sc.nextInt();
		C =sc.nextInt();
		X =sc.nextInt();
		for(int i = 0; i <= A; i++) {
			for(int j = 0; j <= B; j++) {
				for(int k = 0; k <= C; k++) {
					if(i * 500 + j * 100 + k * 50 == X) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
		sc.close();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	public static void main(String[] args) {
		new Main().run();
	}
}