import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
int ans=0;
		for (int i1 = 0; i1 <= a; i1++) {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		}
System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
int ans=0;
		for (int i1 = 0; i1 <= a; i1++) {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		}
System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
int ans=0;
		for (int i1 = 0; i1 <= a; i1++) {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		}
System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
int ans=0;
		for (int i1 = 0; i1 <= a; i1++) {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		}
System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int ans=0; ans 0 for (int i1 = 0; i1 <= a; i1++) {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		} int i1 = 0; int i1 = 0; i1 0 i1 <= a i1 a i1++ i1++ i1 {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		} {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		} for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			} int i2 = 0; int i2 = 0; i2 0 i2 <= b i2 b i2++ i2++ i2 {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			} {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			} for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				} int i3 = 0; int i3 = 0; i3 0 i3 <= c i3 c i3++ i3++ i3 {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				} {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				} if(500*i1+100*i2+50*i3==x){
				ans++;
			} 500*i1+100*i2+50*i3==x 500*i1+100*i2+50*i3 500*i1+100*i2+50*i3 500*i1 500 i1 100*i2 100 i2 50*i3 50 i3 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) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
int ans=0;
		for (int i1 = 0; i1 <= a; i1++) {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		}
System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
int ans=0;
		for (int i1 = 0; i1 <= a; i1++) {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


				}
			}
		}
System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();
int ans=0;
		for (int i1 = 0; i1 <= a; i1++) {
			for (int i2 = 0; i2 <= b; i2++) {
				for (int i3 = 0; i3 <= c; i3++) {

			if(500*i1+100*i2+50*i3==x){
				ans++;
			}


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