import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ

    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int count = 0;
    int sum1 = 0;
    int sum2 = 0;
    int sum3 = 0;

    // 500円利用する
    for (int i = 0; i <= a; i++) {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    }

    System.out.println(count);

  }

} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ

    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int count = 0;
    int sum1 = 0;
    int sum2 = 0;
    int sum3 = 0;

    // 500円利用する
    for (int i = 0; i <= a; i++) {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    }

    System.out.println(count);

  }

} Main public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ

    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int count = 0;
    int sum1 = 0;
    int sum2 = 0;
    int sum3 = 0;

    // 500円利用する
    for (int i = 0; i <= a; i++) {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    }

    System.out.println(count);

  } main {
    // TODO 自動生成されたメソッド・スタブ

    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int count = 0;
    int sum1 = 0;
    int sum2 = 0;
    int sum3 = 0;

    // 500円利用する
    for (int i = 0; i <= a; i++) {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    }

    System.out.println(count);

  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 int sum1 = 0; sum1 0 int sum2 = 0; sum2 0 int sum3 = 0; sum3 0 for (int i = 0; i <= a; i++) {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    } int i = 0; int i = 0; i 0 i <= a i a i++ i++ i {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    } {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    } sum1 = i * 500 sum1 i * 500 i 500 for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      } int j = 0; int j = 0; j 0 j <= b j b j++ j++ j {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      } {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      } sum2 = j * 100 sum2 j * 100 j 100 for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        } int k = 0; int k = 0; k 0 k <= c k c k++ k++ k {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        } {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        } sum3 = k * 50 sum3 k * 50 k 50 if ((sum1 + sum2+ sum3) == x) {
            count++;
          } (sum1 + sum2+ sum3) == x (sum1 + sum2+ sum3) sum1 + sum2+ sum3 sum1 sum2 sum3 x {
            count++;
          } 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) {
    // TODO 自動生成されたメソッド・スタブ

    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int count = 0;
    int sum1 = 0;
    int sum2 = 0;
    int sum3 = 0;

    // 500円利用する
    for (int i = 0; i <= a; i++) {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    }

    System.out.println(count);

  }

} public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ

    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int count = 0;
    int sum1 = 0;
    int sum2 = 0;
    int sum3 = 0;

    // 500円利用する
    for (int i = 0; i <= a; i++) {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    }

    System.out.println(count);

  }

} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ

    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int count = 0;
    int sum1 = 0;
    int sum2 = 0;
    int sum3 = 0;

    // 500円利用する
    for (int i = 0; i <= a; i++) {
      sum1 = i * 500;
      for (int j = 0; j <= b; j++) {
        sum2 = j * 100;
        for (int k = 0; k <= c; k++) {
          sum3 = k * 50;
          if ((sum1 + sum2+ sum3) == x) {
            count++;
          }
        }
      }
    }

    System.out.println(count);

  }

}