import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    //各硬貨と目標額
    int coinA = sc.nextInt();
    int coinB = sc.nextInt();
    int coinC = sc.nextInt();
    int X = sc.nextInt();
    int calc = 0;
    int answer = 0;
    for (int i=0;i<=coinA;i++){
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    }
    System.out.println(answer);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    //各硬貨と目標額
    int coinA = sc.nextInt();
    int coinB = sc.nextInt();
    int coinC = sc.nextInt();
    int X = sc.nextInt();
    int calc = 0;
    int answer = 0;
    for (int i=0;i<=coinA;i++){
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    }
    System.out.println(answer);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    //各硬貨と目標額
    int coinA = sc.nextInt();
    int coinB = sc.nextInt();
    int coinC = sc.nextInt();
    int X = sc.nextInt();
    int calc = 0;
    int answer = 0;
    for (int i=0;i<=coinA;i++){
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    }
    System.out.println(answer);
  } main {
    Scanner sc = new Scanner(System.in);
    //各硬貨と目標額
    int coinA = sc.nextInt();
    int coinB = sc.nextInt();
    int coinC = sc.nextInt();
    int X = sc.nextInt();
    int calc = 0;
    int answer = 0;
    for (int i=0;i<=coinA;i++){
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    }
    System.out.println(answer);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int coinA = sc.nextInt(); coinA sc.nextInt() sc.nextInt sc int coinB = sc.nextInt(); coinB sc.nextInt() sc.nextInt sc int coinC = sc.nextInt(); coinC sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int calc = 0; calc 0 int answer = 0; answer 0 for (int i=0;i<=coinA;i++){
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    } int i=0; int i=0; i 0 i<=coinA i coinA i++ i++ i {
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    } {
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    } for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      } int j=0; int j=0; j 0 j<=coinB j coinB j++ j++ j {
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      } {
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      } for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        } int k=0; int k=0; k 0 k<=coinC k coinC k++ k++ k {
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        } {
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        } calc = (500*i) + (100*j) + (50*k) calc (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 (X == calc){
            answer = answer + 1;
          } X == calc X calc {
            answer = answer + 1;
          } answer = answer + 1 answer answer + 1 answer 1 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    //各硬貨と目標額
    int coinA = sc.nextInt();
    int coinB = sc.nextInt();
    int coinC = sc.nextInt();
    int X = sc.nextInt();
    int calc = 0;
    int answer = 0;
    for (int i=0;i<=coinA;i++){
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    }
    System.out.println(answer);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    //各硬貨と目標額
    int coinA = sc.nextInt();
    int coinB = sc.nextInt();
    int coinC = sc.nextInt();
    int X = sc.nextInt();
    int calc = 0;
    int answer = 0;
    for (int i=0;i<=coinA;i++){
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    }
    System.out.println(answer);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    //各硬貨と目標額
    int coinA = sc.nextInt();
    int coinB = sc.nextInt();
    int coinC = sc.nextInt();
    int X = sc.nextInt();
    int calc = 0;
    int answer = 0;
    for (int i=0;i<=coinA;i++){
      for (int j=0;j<=coinB;j++){
        for (int k=0;k<=coinC;k++){
          calc = (500*i) + (100*j) + (50*k);
          if (X == calc){
            answer = answer + 1;
          }
        }
      }
    }
    System.out.println(answer);
  }
}