import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int count = 0;

		int num500 = scan.nextInt();
		int num100 = scan.nextInt();
		int num50 = scan.nextInt();
		int xYen = scan.nextInt();

		for(int i = 0; i <= num500; i++) {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		}

		System.out.println(count);
		scan.close();
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int count = 0;

		int num500 = scan.nextInt();
		int num100 = scan.nextInt();
		int num50 = scan.nextInt();
		int xYen = scan.nextInt();

		for(int i = 0; i <= num500; i++) {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		}

		System.out.println(count);
		scan.close();
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int count = 0;

		int num500 = scan.nextInt();
		int num100 = scan.nextInt();
		int num50 = scan.nextInt();
		int xYen = scan.nextInt();

		for(int i = 0; i <= num500; i++) {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		}

		System.out.println(count);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int count = 0;

		int num500 = scan.nextInt();
		int num100 = scan.nextInt();
		int num50 = scan.nextInt();
		int xYen = scan.nextInt();

		for(int i = 0; i <= num500; i++) {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		}

		System.out.println(count);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int count = 0; count 0 int num500 = scan.nextInt(); num500 scan.nextInt() scan.nextInt scan int num100 = scan.nextInt(); num100 scan.nextInt() scan.nextInt scan int num50 = scan.nextInt(); num50 scan.nextInt() scan.nextInt scan int xYen = scan.nextInt(); xYen scan.nextInt() scan.nextInt scan for(int i = 0; i <= num500; i++) {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		} int i = 0; int i = 0; i 0 i <= num500 i num500 i++ i++ i {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		} {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		} for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			} int j = 0; int j = 0; j 0 j <= num100 j num100 j++ j++ j {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			} {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			} for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				} int k = 0; int k = 0; k 0 k <= num50 k num50 k++ k++ k {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				} {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				} if(500 * i + 100 * j + 50 * k == xYen)
						count++; 500 * i + 100 * j + 50 * k == xYen 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k xYen count++ count System.out.println(count) System.out.println System.out System System.out count scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int count = 0;

		int num500 = scan.nextInt();
		int num100 = scan.nextInt();
		int num50 = scan.nextInt();
		int xYen = scan.nextInt();

		for(int i = 0; i <= num500; i++) {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		}

		System.out.println(count);
		scan.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int count = 0;

		int num500 = scan.nextInt();
		int num100 = scan.nextInt();
		int num50 = scan.nextInt();
		int xYen = scan.nextInt();

		for(int i = 0; i <= num500; i++) {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		}

		System.out.println(count);
		scan.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int count = 0;

		int num500 = scan.nextInt();
		int num100 = scan.nextInt();
		int num50 = scan.nextInt();
		int xYen = scan.nextInt();

		for(int i = 0; i <= num500; i++) {
			for(int j = 0; j <= num100; j++) {
				for(int k = 0; k <= num50; k++) {
					if(500 * i + 100 * j + 50 * k == xYen)
						count++;
				}
			}
		}

		System.out.println(count);
		scan.close();
	}

}