import java.util.Scanner;
public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int d=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	}
	System.out.println(ans);
	scan.close();
}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int d=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	}
	System.out.println(ans);
	scan.close();
}
} Main public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int d=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	}
	System.out.println(ans);
	scan.close();
} main {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int d=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	}
	System.out.println(ans);
	scan.close();
} 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 d=scan.nextInt(); d scan.nextInt() scan.nextInt scan int ans=0; ans 0 for(int i=0;i<=a;i++) {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	} 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((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	} {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	} for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		} int j=0; int j=0; j 0 j<=b j b j++ j++ j {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		} {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		} for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			} int k=0; int k=0; k 0 k<=c k c k++ k++ k {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			} {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			} if((500*i+100*j+50*k)==d) {
					ans++;
				} (500*i+100*j+50*k)==d (500*i+100*j+50*k) 500*i+100*j+50*k 500*i 500 i 100*j 100 j 50*k 50 k d {
					ans++;
				} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans scan.close() scan.close scan String[]srgs srgs public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int d=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	}
	System.out.println(ans);
	scan.close();
}
} public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int d=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	}
	System.out.println(ans);
	scan.close();
}
} Main
import java.util.Scanner;
public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	int c=scan.nextInt();
	int d=scan.nextInt();
	int ans=0;
	for(int i=0;i<=a;i++) {
		for(int j=0;j<=b;j++) {
			for(int k=0;k<=c;k++) {
				if((500*i+100*j+50*k)==d) {
					ans++;
				}
			}
		}
	}
	System.out.println(ans);
	scan.close();
}
}