import java.util.*;

public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int num500 = sc.nextInt();
      	int num100 = sc.nextInt();
      	int num50 = sc.nextInt();
      	int targetAmount = sc.nextInt();
      	int count = 0;
      	
      	for(int i = 0; i <= num500; i++) {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        }
      	System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int num500 = sc.nextInt();
      	int num100 = sc.nextInt();
      	int num50 = sc.nextInt();
      	int targetAmount = sc.nextInt();
      	int count = 0;
      	
      	for(int i = 0; i <= num500; i++) {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        }
      	System.out.println(count);
    }
} Main public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int num500 = sc.nextInt();
      	int num100 = sc.nextInt();
      	int num50 = sc.nextInt();
      	int targetAmount = sc.nextInt();
      	int count = 0;
      	
      	for(int i = 0; i <= num500; i++) {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        }
      	System.out.println(count);
    } main {  
  		Scanner sc = new Scanner(System.in);
      	int num500 = sc.nextInt();
      	int num100 = sc.nextInt();
      	int num50 = sc.nextInt();
      	int targetAmount = sc.nextInt();
      	int count = 0;
      	
      	for(int i = 0; i <= num500; i++) {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        }
      	System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num500 = sc.nextInt(); num500 sc.nextInt() sc.nextInt sc int num100 = sc.nextInt(); num100 sc.nextInt() sc.nextInt sc int num50 = sc.nextInt(); num50 sc.nextInt() sc.nextInt sc int targetAmount = sc.nextInt(); targetAmount sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int i = 0; i <= num500; i++) {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        } int i = 0; int i = 0; i 0 i <= num500 i num500 i++ i++ i {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        } {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        } for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            } int j = 0; int j = 0; j 0 j <= num100 j num100 j++ j++ j {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            } {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            } for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                } int k = 0; int k = 0; k 0 k <= num50 k num50 k++ k++ k {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                } {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                } int total = 500 * i + 100 * j + 50 * k; total 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k if(total == targetAmount) count++; total == targetAmount total targetAmount count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int num500 = sc.nextInt();
      	int num100 = sc.nextInt();
      	int num50 = sc.nextInt();
      	int targetAmount = sc.nextInt();
      	int count = 0;
      	
      	for(int i = 0; i <= num500; i++) {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        }
      	System.out.println(count);
    }
} public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int num500 = sc.nextInt();
      	int num100 = sc.nextInt();
      	int num50 = sc.nextInt();
      	int targetAmount = sc.nextInt();
      	int count = 0;
      	
      	for(int i = 0; i <= num500; i++) {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        }
      	System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {  
  		Scanner sc = new Scanner(System.in);
      	int num500 = sc.nextInt();
      	int num100 = sc.nextInt();
      	int num50 = sc.nextInt();
      	int targetAmount = sc.nextInt();
      	int count = 0;
      	
      	for(int i = 0; i <= num500; i++) {
        	for(int j = 0; j <= num100; j++) {
            	for(int k = 0; k <= num50; k++) {
                	int total = 500 * i + 100 * j + 50 * k;
                  	if(total == targetAmount) count++;
                }
            }
        }
      	System.out.println(count);
    }
}