import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
    	InputStream input = System.in;
      	OutputStream output = System.out;
      	Scanner sc = new Scanner(input);
      	PrintWriter out = new PrintWriter(output);
      	int A = sc.nextInt();
      	int B = sc.nextInt();
      	int C = sc.nextInt();
      	int X = sc.nextInt();
      	int count = 0;
      	for(int i = 0; i <= A; i++){
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        }
      	out.println(count);
      	out.close();
    }
} import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
    	InputStream input = System.in;
      	OutputStream output = System.out;
      	Scanner sc = new Scanner(input);
      	PrintWriter out = new PrintWriter(output);
      	int A = sc.nextInt();
      	int B = sc.nextInt();
      	int C = sc.nextInt();
      	int X = sc.nextInt();
      	int count = 0;
      	for(int i = 0; i <= A; i++){
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        }
      	out.println(count);
      	out.close();
    }
} Main public static void main(String[] args){
    	InputStream input = System.in;
      	OutputStream output = System.out;
      	Scanner sc = new Scanner(input);
      	PrintWriter out = new PrintWriter(output);
      	int A = sc.nextInt();
      	int B = sc.nextInt();
      	int C = sc.nextInt();
      	int X = sc.nextInt();
      	int count = 0;
      	for(int i = 0; i <= A; i++){
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        }
      	out.println(count);
      	out.close();
    } main {
    	InputStream input = System.in;
      	OutputStream output = System.out;
      	Scanner sc = new Scanner(input);
      	PrintWriter out = new PrintWriter(output);
      	int A = sc.nextInt();
      	int B = sc.nextInt();
      	int C = sc.nextInt();
      	int X = sc.nextInt();
      	int count = 0;
      	for(int i = 0; i <= A; i++){
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        }
      	out.println(count);
      	out.close();
    } InputStream input = System.in; input System.in System System.in OutputStream output = System.out; output System.out System System.out Scanner sc = new Scanner(input); sc new Scanner(input) PrintWriter out = new PrintWriter(output); out new PrintWriter(output) 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 count = 0; count 0 for(int i = 0; i <= A; i++){
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i <= A i A i++ i++ i {
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        } {
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        } for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            } int j = 0; int j = 0; j 0 j <= B j B j++ j++ j {
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            } {
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            } for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                } int l = 0; int l = 0; l 0 l <= C l C l++ l++ l {
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                } {
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                } if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    } (500 * i) + (100 * j) + (50 * l) == X (500 * i) + (100 * j) + (50 * l) (500 * i) + (100 * j) + (50 * l) (500 * i) 500 i (100 * j) 100 j (50 * l) 50 l X {
                    	count++;
                    } count++ count out.println(count) out.println out count out.close() out.close out String[] args args public class Main{
	public static void main(String[] args){
    	InputStream input = System.in;
      	OutputStream output = System.out;
      	Scanner sc = new Scanner(input);
      	PrintWriter out = new PrintWriter(output);
      	int A = sc.nextInt();
      	int B = sc.nextInt();
      	int C = sc.nextInt();
      	int X = sc.nextInt();
      	int count = 0;
      	for(int i = 0; i <= A; i++){
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        }
      	out.println(count);
      	out.close();
    }
} public class Main{
	public static void main(String[] args){
    	InputStream input = System.in;
      	OutputStream output = System.out;
      	Scanner sc = new Scanner(input);
      	PrintWriter out = new PrintWriter(output);
      	int A = sc.nextInt();
      	int B = sc.nextInt();
      	int C = sc.nextInt();
      	int X = sc.nextInt();
      	int count = 0;
      	for(int i = 0; i <= A; i++){
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        }
      	out.println(count);
      	out.close();
    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
    	InputStream input = System.in;
      	OutputStream output = System.out;
      	Scanner sc = new Scanner(input);
      	PrintWriter out = new PrintWriter(output);
      	int A = sc.nextInt();
      	int B = sc.nextInt();
      	int C = sc.nextInt();
      	int X = sc.nextInt();
      	int count = 0;
      	for(int i = 0; i <= A; i++){
        	for(int j = 0; j <= B; j++){
            	for(int l = 0; l <= C; l++){
                	if((500 * i) + (100 * j) + (50 * l) == X){
                    	count++;
                    }
                }
            }
        }
      	out.println(count);
      	out.close();
    }
}