import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer output = 0;

		Integer coins500 = new Integer(scanner.next());
		Integer coins100 = new Integer(scanner.next());
		Integer coins50 = new Integer(scanner.next());
		Integer total = new Integer(scanner.next());

		for(int i = 0; i<= coins500;i++) {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		}
		System.out.println(output);
		scanner.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer output = 0;

		Integer coins500 = new Integer(scanner.next());
		Integer coins100 = new Integer(scanner.next());
		Integer coins50 = new Integer(scanner.next());
		Integer total = new Integer(scanner.next());

		for(int i = 0; i<= coins500;i++) {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		}
		System.out.println(output);
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer output = 0;

		Integer coins500 = new Integer(scanner.next());
		Integer coins100 = new Integer(scanner.next());
		Integer coins50 = new Integer(scanner.next());
		Integer total = new Integer(scanner.next());

		for(int i = 0; i<= coins500;i++) {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		}
		System.out.println(output);
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		Integer output = 0;

		Integer coins500 = new Integer(scanner.next());
		Integer coins100 = new Integer(scanner.next());
		Integer coins50 = new Integer(scanner.next());
		Integer total = new Integer(scanner.next());

		for(int i = 0; i<= coins500;i++) {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		}
		System.out.println(output);
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) Integer output = 0; output 0 Integer coins500 = new Integer(scanner.next()); coins500 new Integer(scanner.next()) Integer coins100 = new Integer(scanner.next()); coins100 new Integer(scanner.next()) Integer coins50 = new Integer(scanner.next()); coins50 new Integer(scanner.next()) Integer total = new Integer(scanner.next()); total new Integer(scanner.next()) for(int i = 0; i<= coins500;i++) {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i<= coins500 i coins500 i++ i++ i {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		} {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		} for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			} int j= 0; int j= 0; j 0 j<=coins100 j coins100 j++ j++ j {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			} {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			} for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				} int k = 0; int k = 0; k 0 k <=coins50 k coins50 k++ k++ k {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				} {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				} if(total == (i*500+j*100+k *50)) {
						output ++ ;
					} total == (i*500+j*100+k *50) total (i*500+j*100+k *50) i*500+j*100+k *50 i*500 i 500 j*100 j 100 k *50 k 50 {
						output ++ ;
					} output ++ output System.out.println(output) System.out.println System.out System System.out output scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer output = 0;

		Integer coins500 = new Integer(scanner.next());
		Integer coins100 = new Integer(scanner.next());
		Integer coins50 = new Integer(scanner.next());
		Integer total = new Integer(scanner.next());

		for(int i = 0; i<= coins500;i++) {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		}
		System.out.println(output);
		scanner.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer output = 0;

		Integer coins500 = new Integer(scanner.next());
		Integer coins100 = new Integer(scanner.next());
		Integer coins50 = new Integer(scanner.next());
		Integer total = new Integer(scanner.next());

		for(int i = 0; i<= coins500;i++) {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		}
		System.out.println(output);
		scanner.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer output = 0;

		Integer coins500 = new Integer(scanner.next());
		Integer coins100 = new Integer(scanner.next());
		Integer coins50 = new Integer(scanner.next());
		Integer total = new Integer(scanner.next());

		for(int i = 0; i<= coins500;i++) {
			for(int j= 0;j<=coins100;j++) {
				for(int k = 0; k <=coins50;k++) {
					if(total == (i*500+j*100+k *50)) {
						output ++ ;
					}
				}
			}
		}
		System.out.println(output);
		scanner.close();
	}
}