import java.io.*;

public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    int c500 = Integer.parseInt(br.readLine());
    int c100 = Integer.parseInt(br.readLine());
    int c50 = Integer.parseInt(br.readLine());
    int total = Integer.parseInt(br.readLine());
    
    int choice = 0;
    int left = total;
    
    for(int i = 0; i<=c500; i++){
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    }
    System.out.println(choice);
  }
}
           import java.io.*; io.* java public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    int c500 = Integer.parseInt(br.readLine());
    int c100 = Integer.parseInt(br.readLine());
    int c50 = Integer.parseInt(br.readLine());
    int total = Integer.parseInt(br.readLine());
    
    int choice = 0;
    int left = total;
    
    for(int i = 0; i<=c500; i++){
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    }
    System.out.println(choice);
  }
} Main public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    int c500 = Integer.parseInt(br.readLine());
    int c100 = Integer.parseInt(br.readLine());
    int c50 = Integer.parseInt(br.readLine());
    int total = Integer.parseInt(br.readLine());
    
    int choice = 0;
    int left = total;
    
    for(int i = 0; i<=c500; i++){
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    }
    System.out.println(choice);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    int c500 = Integer.parseInt(br.readLine());
    int c100 = Integer.parseInt(br.readLine());
    int c50 = Integer.parseInt(br.readLine());
    int total = Integer.parseInt(br.readLine());
    
    int choice = 0;
    int left = total;
    
    for(int i = 0; i<=c500; i++){
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    }
    System.out.println(choice);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int c500 = Integer.parseInt(br.readLine()); c500 Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int c100 = Integer.parseInt(br.readLine()); c100 Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int c50 = Integer.parseInt(br.readLine()); c50 Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int total = Integer.parseInt(br.readLine()); total Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int choice = 0; choice 0 int left = total; left total for(int i = 0; i<=c500; i++){
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    } int i = 0; int i = 0; i 0 i<=c500 i c500 i++ i++ i {
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    } {
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    } for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      } int j = 0; int j = 0; j 0 j<=c100 j c100 j++ j++ j {
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      } {
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      } for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        } int k = 0; int k = 0; k 0 k <= c50 k c50 k++ k++ k {
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        } {
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        } if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          } i * 500 + j * 100 + k * 50 == total i * 500 + j * 100 + k * 50 i * 500 + j * 100 + k * 50 i * 500 i 500 j * 100 j 100 k * 50 k 50 total {
            choice++;
          } choice++ choice if(i * 500 + j * 100 + k *50 > total){
            break;
          } i * 500 + j * 100 + k *50 > total i * 500 + j * 100 + k *50 i * 500 + j * 100 + k *50 i * 500 i 500 j * 100 j 100 k *50 k 50 total {
            break;
          } break; System.out.println(choice) System.out.println System.out System System.out choice String[] args args public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    int c500 = Integer.parseInt(br.readLine());
    int c100 = Integer.parseInt(br.readLine());
    int c50 = Integer.parseInt(br.readLine());
    int total = Integer.parseInt(br.readLine());
    
    int choice = 0;
    int left = total;
    
    for(int i = 0; i<=c500; i++){
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    }
    System.out.println(choice);
  }
} public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    int c500 = Integer.parseInt(br.readLine());
    int c100 = Integer.parseInt(br.readLine());
    int c50 = Integer.parseInt(br.readLine());
    int total = Integer.parseInt(br.readLine());
    
    int choice = 0;
    int left = total;
    
    for(int i = 0; i<=c500; i++){
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    }
    System.out.println(choice);
  }
} Main
import java.io.*;

public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    int c500 = Integer.parseInt(br.readLine());
    int c100 = Integer.parseInt(br.readLine());
    int c50 = Integer.parseInt(br.readLine());
    int total = Integer.parseInt(br.readLine());
    
    int choice = 0;
    int left = total;
    
    for(int i = 0; i<=c500; i++){
      for(int j = 0; j<=c100; j++){
        for(int k = 0; k <= c50; k++){
          if (i * 500 + j * 100 + k * 50 == total){
            choice++;
          }else if(i * 500 + j * 100 + k *50 > total){
            break;
          }
        }
      }
    }
    System.out.println(choice);
  }
}
          
