import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int C = stdIn.nextInt();
		int X = stdIn.nextInt();
		int count = 0;
		for(int i = 0; i <= A && i <= X/500; i++) {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		}
		System.out.println(count);

	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int C = stdIn.nextInt();
		int X = stdIn.nextInt();
		int count = 0;
		for(int i = 0; i <= A && i <= X/500; i++) {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		}
		System.out.println(count);

	}

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

	} main {
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int C = stdIn.nextInt();
		int X = stdIn.nextInt();
		int count = 0;
		for(int i = 0; i <= A && i <= X/500; i++) {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		}
		System.out.println(count);

	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int A = stdIn.nextInt(); A stdIn.nextInt() stdIn.nextInt stdIn int B = stdIn.nextInt(); B stdIn.nextInt() stdIn.nextInt stdIn int C = stdIn.nextInt(); C stdIn.nextInt() stdIn.nextInt stdIn int X = stdIn.nextInt(); X stdIn.nextInt() stdIn.nextInt stdIn int count = 0; count 0 for(int i = 0; i <= A && i <= X/500; i++) {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		} int i = 0; int i = 0; i 0 i <= A && i <= X/500 i <= A i A i <= X/500 i X/500 X 500 i++ i++ i {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		} {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		} for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			} int j = 0; int j = 0; j 0 j <= B && j <= (X-500*i)/100 j <= B j B j <= (X-500*i)/100 j (X-500*i)/100 (X-500*i) X 500*i 500 i 100 j++ j++ j {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			} {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			} if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++; (X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C (X-500*i-100*j)%50 == 0 (X-500*i-100*j)%50 (X-500*i-100*j) X-500*i-100*j X 500*i 500 i 100*j 100 j 50 0 (X-500*i-100*j)/50 <= C (X-500*i-100*j)/50 (X-500*i-100*j) X-500*i-100*j X 500*i 500 i 100*j 100 j 50 C 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 stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int C = stdIn.nextInt();
		int X = stdIn.nextInt();
		int count = 0;
		for(int i = 0; i <= A && i <= X/500; i++) {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		}
		System.out.println(count);

	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int C = stdIn.nextInt();
		int X = stdIn.nextInt();
		int count = 0;
		for(int i = 0; i <= A && i <= X/500; i++) {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		}
		System.out.println(count);

	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int C = stdIn.nextInt();
		int X = stdIn.nextInt();
		int count = 0;
		for(int i = 0; i <= A && i <= X/500; i++) {
			for(int j = 0; j <= B && j <= (X-500*i)/100; j++) {
				if((X-500*i-100*j)%50 == 0 && (X-500*i-100*j)/50 <= C) count++;
			}
		}
		System.out.println(count);

	}

}