import java.util.HashMap;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		HashMap<Integer, Integer> hs = new HashMap<Integer, Integer>();

		hs.put(500, scanner.nextInt());
		hs.put(100, scanner.nextInt());
		hs.put(50, scanner.nextInt());
		int total = scanner.nextInt();
		int success = 0;

		for(int i = 0; i <= hs.get(500); i++) {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		}

		System.out.println(success);

		scanner.close();
	}
} import java.util.HashMap; HashMap java.util import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		HashMap<Integer, Integer> hs = new HashMap<Integer, Integer>();

		hs.put(500, scanner.nextInt());
		hs.put(100, scanner.nextInt());
		hs.put(50, scanner.nextInt());
		int total = scanner.nextInt();
		int success = 0;

		for(int i = 0; i <= hs.get(500); i++) {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		}

		System.out.println(success);

		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		HashMap<Integer, Integer> hs = new HashMap<Integer, Integer>();

		hs.put(500, scanner.nextInt());
		hs.put(100, scanner.nextInt());
		hs.put(50, scanner.nextInt());
		int total = scanner.nextInt();
		int success = 0;

		for(int i = 0; i <= hs.get(500); i++) {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		}

		System.out.println(success);

		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		HashMap<Integer, Integer> hs = new HashMap<Integer, Integer>();

		hs.put(500, scanner.nextInt());
		hs.put(100, scanner.nextInt());
		hs.put(50, scanner.nextInt());
		int total = scanner.nextInt();
		int success = 0;

		for(int i = 0; i <= hs.get(500); i++) {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		}

		System.out.println(success);

		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) HashMap<Integer, Integer> hs = new HashMap<Integer, Integer>(); hs new HashMap<Integer, Integer>() hs.put(500, scanner.nextInt()) hs.put hs 500 scanner.nextInt() scanner.nextInt scanner hs.put(100, scanner.nextInt()) hs.put hs 100 scanner.nextInt() scanner.nextInt scanner hs.put(50, scanner.nextInt()) hs.put hs 50 scanner.nextInt() scanner.nextInt scanner int total = scanner.nextInt(); total scanner.nextInt() scanner.nextInt scanner int success = 0; success 0 for(int i = 0; i <= hs.get(500); i++) {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		} int i = 0; int i = 0; i 0 i <= hs.get(500) i hs.get(500) hs.get hs 500 i++ i++ i {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		} {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		} for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			} int j = 0; int j = 0; j 0 j <= hs.get(100) j hs.get(100) hs.get hs 100 j++ j++ j {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			} {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			} for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				} int k = 0; int k = 0; k 0 k <= hs.get(50) k hs.get(50) hs.get hs 50 k++ k++ k {
					if(500 * i + 100 * j + 50 * k == total)success++;
				} {
					if(500 * i + 100 * j + 50 * k == total)success++;
				} if(500 * i + 100 * j + 50 * k == total)success++; 500 * i + 100 * j + 50 * k == total 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k total success++ success System.out.println(success) System.out.println System.out System System.out success scanner.close() scanner.close scanner String[] args args public class Main{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		HashMap<Integer, Integer> hs = new HashMap<Integer, Integer>();

		hs.put(500, scanner.nextInt());
		hs.put(100, scanner.nextInt());
		hs.put(50, scanner.nextInt());
		int total = scanner.nextInt();
		int success = 0;

		for(int i = 0; i <= hs.get(500); i++) {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		}

		System.out.println(success);

		scanner.close();
	}
} public class Main{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		HashMap<Integer, Integer> hs = new HashMap<Integer, Integer>();

		hs.put(500, scanner.nextInt());
		hs.put(100, scanner.nextInt());
		hs.put(50, scanner.nextInt());
		int total = scanner.nextInt();
		int success = 0;

		for(int i = 0; i <= hs.get(500); i++) {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		}

		System.out.println(success);

		scanner.close();
	}
} Main
import java.util.HashMap;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		HashMap<Integer, Integer> hs = new HashMap<Integer, Integer>();

		hs.put(500, scanner.nextInt());
		hs.put(100, scanner.nextInt());
		hs.put(50, scanner.nextInt());
		int total = scanner.nextInt();
		int success = 0;

		for(int i = 0; i <= hs.get(500); i++) {
			for(int j = 0; j <= hs.get(100); j++) {
				for(int k = 0; k <= hs.get(50); k++) {
					if(500 * i + 100 * j + 50 * k == total)success++;
				}
			}
		}

		System.out.println(success);

		scanner.close();
	}
}