import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int price = scan.nextInt();
		
		int count = 0;
		for(int x = 0; x <= a; x++){
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int price = scan.nextInt();
		
		int count = 0;
		for(int x = 0; x <= a; x++){
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int price = scan.nextInt();
		
		int count = 0;
		for(int x = 0; x <= a; x++){
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		}
		System.out.println(count);
	} main {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int price = scan.nextInt();
		
		int count = 0;
		for(int x = 0; x <= a; x++){
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		}
		System.out.println(count);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan int price = scan.nextInt(); price scan.nextInt() scan.nextInt scan int count = 0; count 0 for(int x = 0; x <= a; x++){
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		} int x = 0; int x = 0; x 0 x <= a x a x++ x++ x {
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		} {
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		} for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			} int y = 0; int y = 0; y 0 y <= b y b y++ y++ y {
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			} {
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			} for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				} int z = 0; int z = 0; z 0 z <= c z c z++ z++ z {
					if(500 * x + 100 * y + 50 * z == price)count++;
				} {
					if(500 * x + 100 * y + 50 * z == price)count++;
				} if(500 * x + 100 * y + 50 * z == price)count++; 500 * x + 100 * y + 50 * z == price 500 * x + 100 * y + 50 * z 500 * x + 100 * y + 50 * z 500 * x 500 x 100 * y 100 y 50 * z 50 z price 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 scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int price = scan.nextInt();
		
		int count = 0;
		for(int x = 0; x <= a; x++){
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		}
		System.out.println(count);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int price = scan.nextInt();
		
		int count = 0;
		for(int x = 0; x <= a; x++){
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int price = scan.nextInt();
		
		int count = 0;
		for(int x = 0; x <= a; x++){
			for(int y = 0; y <= b; y++){
				for(int z = 0; z <= c; z++){
					if(500 * x + 100 * y + 50 * z == price)count++;
				}
			}
		}
		System.out.println(count);
	}
}