

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int a=gi();
        int b=gi();
        int c=gi();
        int x=gi();
        
        int C=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==x) {
                		C++;
                	}
                }
            }
        }

	    System.out.println(C);

//	    if (isNumber(s1) && isNumber(s2) && s.charAt(a) == '-') {
//	    	System.out.print("Yes");
//	    }else {
//	    	System.out.print("No");
//	    }



	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int a=gi();
        int b=gi();
        int c=gi();
        int x=gi();
        
        int C=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==x) {
                		C++;
                	}
                }
            }
        }

	    System.out.println(C);

//	    if (isNumber(s1) && isNumber(s2) && s.charAt(a) == '-') {
//	    	System.out.print("Yes");
//	    }else {
//	    	System.out.print("No");
//	    }



	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} Main static Scanner scanner; scanner public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int a=gi();
        int b=gi();
        int c=gi();
        int x=gi();
        
        int C=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==x) {
                		C++;
                	}
                }
            }
        }

	    System.out.println(C);

//	    if (isNumber(s1) && isNumber(s2) && s.charAt(a) == '-') {
//	    	System.out.print("Yes");
//	    }else {
//	    	System.out.print("No");
//	    }



	} main {
	    scanner = new Scanner(System.in);

        int a=gi();
        int b=gi();
        int c=gi();
        int x=gi();
        
        int C=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==x) {
                		C++;
                	}
                }
            }
        }

	    System.out.println(C);

//	    if (isNumber(s1) && isNumber(s2) && s.charAt(a) == '-') {
//	    	System.out.print("Yes");
//	    }else {
//	    	System.out.print("No");
//	    }



	} scanner = new Scanner(System.in) scanner new Scanner(System.in) int a=gi(); a gi() gi int b=gi(); b gi() gi int c=gi(); c gi() gi int x=gi(); x gi() gi int C=0; C 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==x) {
                		C++;
                	}
                }
            }
        } 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==x) {
                		C++;
                	}
                }
            }
        } {
        	for (int j=0; j<=b; j++) {
        		for (int k=0; k<=c; k++) {
                	if(500*i+100*j+50*k==x) {
                		C++;
                	}
                }
            }
        } for (int j=0; j<=b; j++) {
        		for (int k=0; k<=c; k++) {
                	if(500*i+100*j+50*k==x) {
                		C++;
                	}
                }
            } 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==x) {
                		C++;
                	}
                }
            } {
        		for (int k=0; k<=c; k++) {
                	if(500*i+100*j+50*k==x) {
                		C++;
                	}
                }
            } for (int k=0; k<=c; k++) {
                	if(500*i+100*j+50*k==x) {
                		C++;
                	}
                } int k=0; int k=0; k 0 k<=c k c k++ k++ k {
                	if(500*i+100*j+50*k==x) {
                		C++;
                	}
                } {
                	if(500*i+100*j+50*k==x) {
                		C++;
                	}
                } if(500*i+100*j+50*k==x) {
                		C++;
                	} 500*i+100*j+50*k==x 500*i+100*j+50*k 500*i+100*j+50*k 500*i 500 i 100*j 100 j 50*k 50 k x {
                		C++;
                	} C++ C System.out.println(C) System.out.println System.out System System.out C String[] args args public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	} d {
		String a=String.valueOf(n);
		return (long)a.length();
	} String a=String.valueOf(n); a String.valueOf(n) String.valueOf String n return (long)a.length(); (long)a.length() a.length a long n n // 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	} gs {
		return scanner.next();
	} return scanner.next(); scanner.next() scanner.next scanner // intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	} gi {
		return Integer.parseInt(scanner.next());
	} return Integer.parseInt(scanner.next()); Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner // longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	} gl {
		return Long.parseLong(scanner.next());
	} return Long.parseLong(scanner.next()); Long.parseLong(scanner.next()) Long.parseLong Long scanner.next() scanner.next scanner // doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	} gd {
		return Double.parseDouble(scanner.next());
	} return Double.parseDouble(scanner.next()); Double.parseDouble(scanner.next()) Double.parseDouble Double scanner.next() scanner.next scanner public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int a=gi();
        int b=gi();
        int c=gi();
        int x=gi();
        
        int C=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==x) {
                		C++;
                	}
                }
            }
        }

	    System.out.println(C);

//	    if (isNumber(s1) && isNumber(s2) && s.charAt(a) == '-') {
//	    	System.out.print("Yes");
//	    }else {
//	    	System.out.print("No");
//	    }



	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int a=gi();
        int b=gi();
        int c=gi();
        int x=gi();
        
        int C=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==x) {
                		C++;
                	}
                }
            }
        }

	    System.out.println(C);

//	    if (isNumber(s1) && isNumber(s2) && s.charAt(a) == '-') {
//	    	System.out.print("Yes");
//	    }else {
//	    	System.out.print("No");
//	    }



	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
} Main


import java.util.Arrays;
import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int a=gi();
        int b=gi();
        int c=gi();
        int x=gi();
        
        int C=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==x) {
                		C++;
                	}
                }
            }
        }

	    System.out.println(C);

//	    if (isNumber(s1) && isNumber(s2) && s.charAt(a) == '-') {
//	    	System.out.print("Yes");
//	    }else {
//	    	System.out.print("No");
//	    }



	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
}