import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Coins solver = new Coins();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}


	static public class Coins {

		private int a;
		private int b;
		private int c;
		private int x;

		private Scanner scanner;
		private int output;
		public Coins() {
			scanner = new Scanner(System.in);
			output = 0;
		}
		public void readInput() {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();
			x = scanner.nextInt();
		}
		public void solve() {
			for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			}
		}
		public void writeOutput() {
			System.out.println(output);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Coins solver = new Coins();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}


	static public class Coins {

		private int a;
		private int b;
		private int c;
		private int x;

		private Scanner scanner;
		private int output;
		public Coins() {
			scanner = new Scanner(System.in);
			output = 0;
		}
		public void readInput() {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();
			x = scanner.nextInt();
		}
		public void solve() {
			for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			}
		}
		public void writeOutput() {
			System.out.println(output);
		}
	}
} Main public static void main(String[] args) {
		Coins solver = new Coins();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	} main {
		Coins solver = new Coins();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	} Coins solver = new Coins(); solver new Coins() solver.readInput() solver.readInput solver solver.solve() solver.solve solver solver.writeOutput() solver.writeOutput solver String[] args args static public class Coins {

		private int a;
		private int b;
		private int c;
		private int x;

		private Scanner scanner;
		private int output;
		public Coins() {
			scanner = new Scanner(System.in);
			output = 0;
		}
		public void readInput() {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();
			x = scanner.nextInt();
		}
		public void solve() {
			for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			}
		}
		public void writeOutput() {
			System.out.println(output);
		}
	} Coins private int a; a private int b; b private int c; c private int x; x private Scanner scanner; scanner private int output; output public Coins() {
			scanner = new Scanner(System.in);
			output = 0;
		} Coins {
			scanner = new Scanner(System.in);
			output = 0;
		} scanner = new Scanner(System.in) scanner new Scanner(System.in) output = 0 output 0 public void readInput() {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();
			x = scanner.nextInt();
		} readInput {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();
			x = scanner.nextInt();
		} a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner b = scanner.nextInt() b scanner.nextInt() scanner.nextInt scanner c = scanner.nextInt() c scanner.nextInt() scanner.nextInt scanner x = scanner.nextInt() x scanner.nextInt() scanner.nextInt scanner public void solve() {
			for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			}
		} solve {
			for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			}
		} for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			} int i=0; int i=0; i 0 i<=a i a i++ i++ i {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			} {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			} for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				} int j=0; int j=0; j 0 j<=b j b j++ j++ j {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				} {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				} for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					} int k=0; int k=0; k 0 k<=c k c k++ k++ k {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					} {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					} if((x-500*i-100*j-50*k)==0) {
							output++;
						} (x-500*i-100*j-50*k)==0 (x-500*i-100*j-50*k) 100*j x-500*i-100*j-50*k x 500*i 500 i 100*j 100 j 50*k 50 k 0 {
							output++;
						} output++ output public void writeOutput() {
			System.out.println(output);
		} writeOutput {
			System.out.println(output);
		} System.out.println(output) System.out.println System.out System System.out output public class Main {

	public static void main(String[] args) {
		Coins solver = new Coins();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}


	static public class Coins {

		private int a;
		private int b;
		private int c;
		private int x;

		private Scanner scanner;
		private int output;
		public Coins() {
			scanner = new Scanner(System.in);
			output = 0;
		}
		public void readInput() {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();
			x = scanner.nextInt();
		}
		public void solve() {
			for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			}
		}
		public void writeOutput() {
			System.out.println(output);
		}
	}
} public class Main {

	public static void main(String[] args) {
		Coins solver = new Coins();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}


	static public class Coins {

		private int a;
		private int b;
		private int c;
		private int x;

		private Scanner scanner;
		private int output;
		public Coins() {
			scanner = new Scanner(System.in);
			output = 0;
		}
		public void readInput() {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();
			x = scanner.nextInt();
		}
		public void solve() {
			for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			}
		}
		public void writeOutput() {
			System.out.println(output);
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Coins solver = new Coins();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}


	static public class Coins {

		private int a;
		private int b;
		private int c;
		private int x;

		private Scanner scanner;
		private int output;
		public Coins() {
			scanner = new Scanner(System.in);
			output = 0;
		}
		public void readInput() {
			a = scanner.nextInt();
			b = scanner.nextInt();
			c = scanner.nextInt();
			x = scanner.nextInt();
		}
		public void solve() {
			for(int i=0;i<=a;i++) {
				for(int j=0;j<=b;j++) {
					for(int k=0;k<=c;k++) {
						if((x-500*i-100*j-50*k)==0) {
							output++;
						}
					}
				}
			}
		}
		public void writeOutput() {
			System.out.println(output);
		}
	}
}
