import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int A,B,C,X;

		try(Scanner sc = new Scanner(System.in)){
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		}

		int ans = 0;

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

		System.out.println(ans);
	}

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

	public static void main(String[] args) {

		int A,B,C,X;

		try(Scanner sc = new Scanner(System.in)){
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		}

		int ans = 0;

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

		System.out.println(ans);
	}

} Main public static void main(String[] args) {

		int A,B,C,X;

		try(Scanner sc = new Scanner(System.in)){
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		}

		int ans = 0;

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

		System.out.println(ans);
	} main {

		int A,B,C,X;

		try(Scanner sc = new Scanner(System.in)){
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		}

		int ans = 0;

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

		System.out.println(ans);
	} int A A B B C C X; X try(Scanner sc = new Scanner(System.in)){
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		} {
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) 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 int ans = 0; ans 0 for(int a = 0; a <= A; a++){
			for(int b = 0; b <= B; b++){
				for(int c = 0; c <= C; c++){
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				}
			}
		} 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++){
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				}
			}
		} {
			for(int b = 0; b <= B; b++){
				for(int c = 0; c <= C; c++){
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				}
			}
		} for(int b = 0; b <= B; b++){
				for(int c = 0; c <= C; c++){
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				}
			} int b = 0; int b = 0; b 0 b <= B b B b++ b++ b {
				for(int c = 0; c <= C; c++){
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				}
			} {
				for(int c = 0; c <= C; c++){
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				}
			} for(int c = 0; c <= C; c++){
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				} int c = 0; int c = 0; c 0 c <= C c C c++ c++ c {
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				} {
					if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					}
				} if((500 * a + 100 * b + 50 * c) == X){
						ans++;
					} (500 * a + 100 * b + 50 * c) == X (500 * a + 100 * b + 50 * c) 500 * a + 100 * b + 50 * c 500 * a 500 a 100 * b 100 b 50 * c 50 c X {
						ans++;
					} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {

		int A,B,C,X;

		try(Scanner sc = new Scanner(System.in)){
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		}

		int ans = 0;

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

		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {

		int A,B,C,X;

		try(Scanner sc = new Scanner(System.in)){
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		}

		int ans = 0;

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

		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int A,B,C,X;

		try(Scanner sc = new Scanner(System.in)){
			A = sc.nextInt();
			B = sc.nextInt();
			C = sc.nextInt();
			X = sc.nextInt();
		}

		int ans = 0;

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

		System.out.println(ans);
	}

}
