/* package whatever; // don't place package name! */
 
import java.util.*;
import java.lang.*;
import java.io.*;
 
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc =new Scanner(System.in);
		while(sc.hasNext()){
			int a=sc.nextInt();
		    int b=sc.nextInt();
			int c=sc.nextInt();
		    int x=sc.nextInt();
		    int n=0;
		    for(int i=0;i<=a;i++){
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    }
		    System.out.println(n);
		    
			
			
			
			
		}
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc =new Scanner(System.in);
		while(sc.hasNext()){
			int a=sc.nextInt();
		    int b=sc.nextInt();
			int c=sc.nextInt();
		    int x=sc.nextInt();
		    int n=0;
		    for(int i=0;i<=a;i++){
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    }
		    System.out.println(n);
		    
			
			
			
			
		}
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc =new Scanner(System.in);
		while(sc.hasNext()){
			int a=sc.nextInt();
		    int b=sc.nextInt();
			int c=sc.nextInt();
		    int x=sc.nextInt();
		    int n=0;
		    for(int i=0;i<=a;i++){
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    }
		    System.out.println(n);
		    
			
			
			
			
		}
	} main {
		Scanner sc =new Scanner(System.in);
		while(sc.hasNext()){
			int a=sc.nextInt();
		    int b=sc.nextInt();
			int c=sc.nextInt();
		    int x=sc.nextInt();
		    int n=0;
		    for(int i=0;i<=a;i++){
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    }
		    System.out.println(n);
		    
			
			
			
			
		}
	} Scanner sc =new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			int a=sc.nextInt();
		    int b=sc.nextInt();
			int c=sc.nextInt();
		    int x=sc.nextInt();
		    int n=0;
		    for(int i=0;i<=a;i++){
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    }
		    System.out.println(n);
		    
			
			
			
			
		} sc.hasNext() sc.hasNext sc {
			int a=sc.nextInt();
		    int b=sc.nextInt();
			int c=sc.nextInt();
		    int x=sc.nextInt();
		    int n=0;
		    for(int i=0;i<=a;i++){
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    }
		    System.out.println(n);
		    
			
			
			
			
		} 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 n=0; n 0 for(int i=0;i<=a;i++){
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    } 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((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    } {
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    } for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 } int j=0; int j=0; j 0 j<=b j b j++ j++ j {
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 } {
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 } for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 } int k=0; int k=0; k 0 k<=c k c k++ k++ k {
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 } {
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 } if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	} (i*500+j*100+k*50)==x (i*500+j*100+k*50) i*500+j*100+k*50 i*500 i 500 j*100 j 100 k*50 k 50 x {
		    	 	 		n++;
		    	 	 	} n++ n System.out.println(n) System.out.println System.out System System.out n String[] args args
/* package whatever; // don't place package name! */
 
import java.util.*;
import java.lang.*;
import java.io.*;
 
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc =new Scanner(System.in);
		while(sc.hasNext()){
			int a=sc.nextInt();
		    int b=sc.nextInt();
			int c=sc.nextInt();
		    int x=sc.nextInt();
		    int n=0;
		    for(int i=0;i<=a;i++){
		    	 for(int j=0;j<=b;j++){
		    	 for(int k=0;k<=c;k++){
		    	 	 	if((i*500+j*100+k*50)==x){
		    	 	 		n++;
		    	 	 	}
		    	 	 }
		    	 	
		    	 }
		    }
		    System.out.println(n);
		    
			
			
			
			
		}
	}
}