import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(); //500
    int B = sc.nextInt(); //100
    int C = sc.nextInt();  //50
    int target = sc.nextInt(); //合計
    int pattern = 0;
    
    for(int i =0 ; i < A+1 ; i++){
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    }
    System.out.println(pattern); 
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) throws Exception {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(); //500
    int B = sc.nextInt(); //100
    int C = sc.nextInt();  //50
    int target = sc.nextInt(); //合計
    int pattern = 0;
    
    for(int i =0 ; i < A+1 ; i++){
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    }
    System.out.println(pattern); 
  }
} Main public static void main(String[] args) throws Exception {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(); //500
    int B = sc.nextInt(); //100
    int C = sc.nextInt();  //50
    int target = sc.nextInt(); //合計
    int pattern = 0;
    
    for(int i =0 ; i < A+1 ; i++){
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    }
    System.out.println(pattern); 
  } main {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(); //500
    int B = sc.nextInt(); //100
    int C = sc.nextInt();  //50
    int target = sc.nextInt(); //合計
    int pattern = 0;
    
    for(int i =0 ; i < A+1 ; i++){
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    }
    System.out.println(pattern); 
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 target = sc.nextInt(); target sc.nextInt() sc.nextInt sc int pattern = 0; pattern 0 for(int i =0 ; i < A+1 ; i++){
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    } int i =0 ; int i =0 ; i 0 i < A+1 i A+1 A 1 i++ i++ i {
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    } {
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    } for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      } int j = 0 ; int j = 0 ; j 0 j < B+1 j B+1 B 1 j++ j++ j {
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      } {
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      } for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        } int k = 0 ; int k = 0 ; k 0 k < C+1 k C+1 C 1 k++ k++ k {
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        } {
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        } if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          } (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 target {
            pattern++;
          } pattern++ pattern System.out.println(pattern) System.out.println System.out System System.out pattern String[] args args public class Main {
  public static void main(String[] args) throws Exception {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(); //500
    int B = sc.nextInt(); //100
    int C = sc.nextInt();  //50
    int target = sc.nextInt(); //合計
    int pattern = 0;
    
    for(int i =0 ; i < A+1 ; i++){
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    }
    System.out.println(pattern); 
  }
} public class Main {
  public static void main(String[] args) throws Exception {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(); //500
    int B = sc.nextInt(); //100
    int C = sc.nextInt();  //50
    int target = sc.nextInt(); //合計
    int pattern = 0;
    
    for(int i =0 ; i < A+1 ; i++){
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    }
    System.out.println(pattern); 
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt(); //500
    int B = sc.nextInt(); //100
    int C = sc.nextInt();  //50
    int target = sc.nextInt(); //合計
    int pattern = 0;
    
    for(int i =0 ; i < A+1 ; i++){
      for(int j = 0 ; j < B+1 ; j++){
        for(int k = 0 ; k < C+1 ; k++){
          if((500 * i) + (100 * j) + (50 * k) == target){
            pattern++;
          }
        }
      }
    }
    System.out.println(pattern); 
  }
}
