import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int cnt = 0;
		for(int i = a; i >= 0; i--) {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		}

		System.out.println(cnt);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int cnt = 0;
		for(int i = a; i >= 0; i--) {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		}

		System.out.println(cnt);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int cnt = 0;
		for(int i = a; i >= 0; i--) {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		}

		System.out.println(cnt);
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int cnt = 0;
		for(int i = a; i >= 0; i--) {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		}

		System.out.println(cnt);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 for(int i = a; i >= 0; i--) {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		} int i = a; int i = a; i a i >= 0 i 0 i-- i-- i {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		} {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		} int suma = i * 500; suma i * 500 i 500 if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			} suma == x suma x {
				cnt++;
				continue;
			} cnt++ cnt continue; if(suma > x) {
				continue;
			} suma > x suma x {
				continue;
			} continue; for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			} int j = b; int j = b; j b j >= 0 j 0 j-- j-- j {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			} {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			} int sumb = suma + j * 100; sumb suma + j * 100 suma j * 100 j 100 if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				} sumb == x sumb x {
					cnt++;
					continue;
				} cnt++ cnt continue; if(sumb > x) {
					continue;
				} sumb > x sumb x {
					continue;
				} continue; for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				} int k = c; int k = c; k c k >= 0 k 0 k-- k-- k {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				} {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				} int sumc = sumb + k * 50; sumc sumb + k * 50 sumb k * 50 k 50 if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					} sumc == x sumc x {
						cnt++;
						continue;
					} cnt++ cnt continue; if(sumc > x) {
						continue;
					} else {
						break;
					} sumc > x sumc x {
						continue;
					} continue; {
						break;
					} break; System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int cnt = 0;
		for(int i = a; i >= 0; i--) {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		}

		System.out.println(cnt);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int cnt = 0;
		for(int i = a; i >= 0; i--) {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		}

		System.out.println(cnt);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int x = sc.nextInt();

		int cnt = 0;
		for(int i = a; i >= 0; i--) {
			int suma = i * 500;
			if(suma == x) {
				cnt++;
				continue;
			} else if(suma > x) {
				continue;
			}
			for(int j = b; j >= 0; j--) {
				int sumb = suma + j * 100;
				if(sumb == x) {
					cnt++;
					continue;
				} else if(sumb > x) {
					continue;
				}

				for(int k = c; k >= 0; k--) {
					int sumc = sumb + k * 50;
					if(sumc == x) {
						cnt++;
						continue;
					} else if(sumc > x) {
						continue;
					} else {
						break;
					}
				}
			}
		}

		System.out.println(cnt);
	}
}