import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

    	Scanner scanner=new Scanner(System.in);


    	int x500=scanner.nextInt();
    	int x100=scanner.nextInt();
    	int x50=scanner.nextInt();
    	int target=scanner.nextInt();


    	int result=0;
    	for(int i=0;i<=x500;i++) {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	}

    	System.out.println(result);

    	scanner.close();


    }

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

    	Scanner scanner=new Scanner(System.in);


    	int x500=scanner.nextInt();
    	int x100=scanner.nextInt();
    	int x50=scanner.nextInt();
    	int target=scanner.nextInt();


    	int result=0;
    	for(int i=0;i<=x500;i++) {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	}

    	System.out.println(result);

    	scanner.close();


    }

} Main public static void main(String[] args) {

    	Scanner scanner=new Scanner(System.in);


    	int x500=scanner.nextInt();
    	int x100=scanner.nextInt();
    	int x50=scanner.nextInt();
    	int target=scanner.nextInt();


    	int result=0;
    	for(int i=0;i<=x500;i++) {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	}

    	System.out.println(result);

    	scanner.close();


    } main {

    	Scanner scanner=new Scanner(System.in);


    	int x500=scanner.nextInt();
    	int x100=scanner.nextInt();
    	int x50=scanner.nextInt();
    	int target=scanner.nextInt();


    	int result=0;
    	for(int i=0;i<=x500;i++) {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	}

    	System.out.println(result);

    	scanner.close();


    } Scanner scanner=new Scanner(System.in); scanner new Scanner(System.in) int x500=scanner.nextInt(); x500 scanner.nextInt() scanner.nextInt scanner int x100=scanner.nextInt(); x100 scanner.nextInt() scanner.nextInt scanner int x50=scanner.nextInt(); x50 scanner.nextInt() scanner.nextInt scanner int target=scanner.nextInt(); target scanner.nextInt() scanner.nextInt scanner int result=0; result 0 for(int i=0;i<=x500;i++) {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	} int i=0; int i=0; i 0 i<=x500 i x500 i++ i++ i {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	} {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	} for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		} int j=0; int j=0; j 0 j<=x100 j x100 j++ j++ j {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		} {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		} for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			} int k=0; int k=0; k 0 k<=x50 k x50 k++ k++ k {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			} {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			} if(target==(500*i+100*j+50*k)){
    					result++;
    				} target==(500*i+100*j+50*k) target (500*i+100*j+50*k) 500*i+100*j+50*k 500*i 500 i 100*j 100 j 50*k 50 k {
    					result++;
    				} result++ result System.out.println(result) System.out.println System.out System System.out result scanner.close() scanner.close scanner String[] args args public class Main {
    public static void main(String[] args) {

    	Scanner scanner=new Scanner(System.in);


    	int x500=scanner.nextInt();
    	int x100=scanner.nextInt();
    	int x50=scanner.nextInt();
    	int target=scanner.nextInt();


    	int result=0;
    	for(int i=0;i<=x500;i++) {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	}

    	System.out.println(result);

    	scanner.close();


    }

} public class Main {
    public static void main(String[] args) {

    	Scanner scanner=new Scanner(System.in);


    	int x500=scanner.nextInt();
    	int x100=scanner.nextInt();
    	int x50=scanner.nextInt();
    	int target=scanner.nextInt();


    	int result=0;
    	for(int i=0;i<=x500;i++) {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	}

    	System.out.println(result);

    	scanner.close();


    }

} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

    	Scanner scanner=new Scanner(System.in);


    	int x500=scanner.nextInt();
    	int x100=scanner.nextInt();
    	int x50=scanner.nextInt();
    	int target=scanner.nextInt();


    	int result=0;
    	for(int i=0;i<=x500;i++) {

    		for(int j=0;j<=x100;j++) {

    			for(int k=0;k<=x50;k++) {

    				if(target==(500*i+100*j+50*k)){
    					result++;
    				}


    			}

    		}
    	}

    	System.out.println(result);

    	scanner.close();


    }

}