import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int A = sc.nextInt();
	        int B = sc.nextInt();
	        int C = sc.nextInt();
	        int X = sc.nextInt();
	        
		int sum = 0;
		int count = 0;
		
		for(int i=0; i<=A; i++) {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		}

     System.out.println(count);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int A = sc.nextInt();
	        int B = sc.nextInt();
	        int C = sc.nextInt();
	        int X = sc.nextInt();
	        
		int sum = 0;
		int count = 0;
		
		for(int i=0; i<=A; i++) {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		}

     System.out.println(count);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int A = sc.nextInt();
	        int B = sc.nextInt();
	        int C = sc.nextInt();
	        int X = sc.nextInt();
	        
		int sum = 0;
		int count = 0;
		
		for(int i=0; i<=A; i++) {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		}

     System.out.println(count);
	} main {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int A = sc.nextInt();
	        int B = sc.nextInt();
	        int C = sc.nextInt();
	        int X = sc.nextInt();
	        
		int sum = 0;
		int count = 0;
		
		for(int i=0; i<=A; i++) {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		}

     System.out.println(count);
	} 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 sum = 0; sum 0 int count = 0; count 0 for(int i=0; i<=A; i++) {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		} int i=0; int i=0; i 0 i<=A i A i++ i++ i {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		} {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		} sum = 500*i sum 500*i 500 i if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			} sum==X sum X {
				count++;
			} count++ count if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			} sum<X sum X {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			} for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				} int j=0; int j=0; j 0 j<=B j B j++ j++ j {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				} {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				} int sum2 = sum; sum2 sum sum2 = sum2 + (100*j) sum2 sum2 + (100*j) sum2 (100*j) 100 j if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					} sum2==X sum2 X {
						count++;
					} count++ count if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					} sum2<X sum2 X {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					} for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						} int h=0; int h=0; h 0 h<=C h C h++ h++ h {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						} {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						} int sum3 = sum2; sum3 sum2 sum3 = sum3 + (50*h) sum3 sum3 + (50*h) sum3 (50*h) 50 h if(sum3== X ) {
								count++;
							} sum3== X sum3 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) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int A = sc.nextInt();
	        int B = sc.nextInt();
	        int C = sc.nextInt();
	        int X = sc.nextInt();
	        
		int sum = 0;
		int count = 0;
		
		for(int i=0; i<=A; i++) {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		}

     System.out.println(count);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int A = sc.nextInt();
	        int B = sc.nextInt();
	        int C = sc.nextInt();
	        int X = sc.nextInt();
	        
		int sum = 0;
		int count = 0;
		
		for(int i=0; i<=A; i++) {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		}

     System.out.println(count);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int A = sc.nextInt();
	        int B = sc.nextInt();
	        int C = sc.nextInt();
	        int X = sc.nextInt();
	        
		int sum = 0;
		int count = 0;
		
		for(int i=0; i<=A; i++) {
			sum = 500*i;
			if(sum==X) {
				count++;
			}else if(sum<X) {
				for(int j=0; j<=B; j++) {
					int sum2 = sum;
					sum2 = sum2 + (100*j);
					if(sum2==X) {
						count++;
					}else if(sum2<X) {
						for(int h=0; h<=C; h++) {
							int sum3 = sum2;
							sum3 = sum3 + (50*h);
							if(sum3== X ) {
								count++;
							}
						}
					}
				}
			}
		}

     System.out.println(count);
	}

}
