import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int numberOfFiveHundredYen = sc.nextInt();
		int numberOfOneHundredYen = sc.nextInt();
		int numberOfFiftyYen = sc.nextInt();
		int fee = sc.nextInt();
		int count = 0;
		
		for(int i = 0; i <= numberOfFiveHundredYen; i++) {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		}
		
		System.out.println(count); 

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int numberOfFiveHundredYen = sc.nextInt();
		int numberOfOneHundredYen = sc.nextInt();
		int numberOfFiftyYen = sc.nextInt();
		int fee = sc.nextInt();
		int count = 0;
		
		for(int i = 0; i <= numberOfFiveHundredYen; i++) {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		}
		
		System.out.println(count); 

		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int numberOfFiveHundredYen = sc.nextInt();
		int numberOfOneHundredYen = sc.nextInt();
		int numberOfFiftyYen = sc.nextInt();
		int fee = sc.nextInt();
		int count = 0;
		
		for(int i = 0; i <= numberOfFiveHundredYen; i++) {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		}
		
		System.out.println(count); 

		
	} main {
		Scanner sc = new Scanner(System.in);
		int numberOfFiveHundredYen = sc.nextInt();
		int numberOfOneHundredYen = sc.nextInt();
		int numberOfFiftyYen = sc.nextInt();
		int fee = sc.nextInt();
		int count = 0;
		
		for(int i = 0; i <= numberOfFiveHundredYen; i++) {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		}
		
		System.out.println(count); 

		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int numberOfFiveHundredYen = sc.nextInt(); numberOfFiveHundredYen sc.nextInt() sc.nextInt sc int numberOfOneHundredYen = sc.nextInt(); numberOfOneHundredYen sc.nextInt() sc.nextInt sc int numberOfFiftyYen = sc.nextInt(); numberOfFiftyYen sc.nextInt() sc.nextInt sc int fee = sc.nextInt(); fee sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i = 0; i <= numberOfFiveHundredYen; i++) {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i <= numberOfFiveHundredYen i numberOfFiveHundredYen i++ i++ i {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		} {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		} for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			} int j=0; int j=0; j 0 j<= numberOfOneHundredYen j numberOfOneHundredYen j++ j++ j {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			} {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			} for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				} int k=0; int k=0; k 0 k <= numberOfFiftyYen k numberOfFiftyYen k++ k++ k {
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				} {
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				} int amountOfPay = 500 * i + 100 * j + 50 * k; amountOfPay 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k if(amountOfPay == fee) {
						count++;
					} amountOfPay == fee amountOfPay fee {
						count++;
					} 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 sc = new Scanner(System.in);
		int numberOfFiveHundredYen = sc.nextInt();
		int numberOfOneHundredYen = sc.nextInt();
		int numberOfFiftyYen = sc.nextInt();
		int fee = sc.nextInt();
		int count = 0;
		
		for(int i = 0; i <= numberOfFiveHundredYen; i++) {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		}
		
		System.out.println(count); 

		
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int numberOfFiveHundredYen = sc.nextInt();
		int numberOfOneHundredYen = sc.nextInt();
		int numberOfFiftyYen = sc.nextInt();
		int fee = sc.nextInt();
		int count = 0;
		
		for(int i = 0; i <= numberOfFiveHundredYen; i++) {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		}
		
		System.out.println(count); 

		
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int numberOfFiveHundredYen = sc.nextInt();
		int numberOfOneHundredYen = sc.nextInt();
		int numberOfFiftyYen = sc.nextInt();
		int fee = sc.nextInt();
		int count = 0;
		
		for(int i = 0; i <= numberOfFiveHundredYen; i++) {
			for(int j=0; j<= numberOfOneHundredYen; j++) {
				for(int k=0; k <= numberOfFiftyYen; k++){
					int amountOfPay = 500 * i + 100 * j + 50 * k;
					if(amountOfPay == fee) {
						count++;
					}
				}
			}
		}
		
		System.out.println(count); 

		
	}
}