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 x = scan.nextInt();
		int x500 = x / 500;
		if(x500 > a) {
			x500 = a;
		}
		int count = 0;
		for(int i = 0; i <= x500; i++) {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						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 x = scan.nextInt();
		int x500 = x / 500;
		if(x500 > a) {
			x500 = a;
		}
		int count = 0;
		for(int i = 0; i <= x500; i++) {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						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 x = scan.nextInt();
		int x500 = x / 500;
		if(x500 > a) {
			x500 = a;
		}
		int count = 0;
		for(int i = 0; i <= x500; i++) {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						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 x = scan.nextInt();
		int x500 = x / 500;
		if(x500 > a) {
			x500 = a;
		}
		int count = 0;
		for(int i = 0; i <= x500; i++) {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						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 x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int x500 = x / 500; x500 x / 500 x 500 if(x500 > a) {
			x500 = a;
		} x500 > a x500 a {
			x500 = a;
		} x500 = a x500 a int count = 0; count 0 for(int i = 0; i <= x500; i++) {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i <= x500 i x500 i++ i++ i {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				}
			}
		} {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				}
			}
		} int x100 = (x - (500 * i)) / 100; x100 (x - (500 * i)) / 100 (x - (500 * i)) x (500 * i) 500 i 100 if(x100 > b) {
				x100 = b;
			} x100 > b x100 b {
				x100 = b;
			} x100 = b x100 b for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				}
			} int j = 0; int j = 0; j 0 j <= x100 j x100 j++ j++ j {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				}
			} {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				}
			} int x50 = (x - (500 * i) - (100 * j)) / 50; x50 (x - (500 * i) - (100 * j)) / 50 (x - (500 * i) - (100 * j)) x - (500 * i) - (100 * j) x (500 * i) 500 i (100 * j) 100 j 50 if(x50 > c) {
					x50 = c;
				} x50 > c x50 c {
					x50 = c;
				} x50 = c x50 c for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				} int k = 0; int k = 0; k 0 k <= x50 k x50 k++ k++ k {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				} {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				} int money = (500 * i) + (100 * j) + (50 * k); money (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(money == x) {
						count++;
					} money == x money x {
						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 scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int x = scan.nextInt();
		int x500 = x / 500;
		if(x500 > a) {
			x500 = a;
		}
		int count = 0;
		for(int i = 0; i <= x500; i++) {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						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 x = scan.nextInt();
		int x500 = x / 500;
		if(x500 > a) {
			x500 = a;
		}
		int count = 0;
		for(int i = 0; i <= x500; i++) {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						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 x = scan.nextInt();
		int x500 = x / 500;
		if(x500 > a) {
			x500 = a;
		}
		int count = 0;
		for(int i = 0; i <= x500; i++) {
			int x100 = (x - (500 * i)) / 100;
			if(x100 > b) {
				x100 = b;
			}
			for(int j = 0; j <= x100; j++) {
				int x50 = (x - (500 * i) - (100 * j)) / 50;
				if(x50 > c) {
					x50 = c;
				}
				for(int k = 0; k <= x50; k++) {
					int money = (500 * i) + (100 * j) + (50 * k);
					if(money == x) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	}
}