import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    final Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int cnt = 0;
    for (int i = 0; i <= a && 500 * i <= x; i++) {
      for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      }
    }
    System.out.println(cnt);
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    final Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int cnt = 0;
    for (int i = 0; i <= a && 500 * i <= x; i++) {
      for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      }
    }
    System.out.println(cnt);
  }
} Main public static void main(String[] args) {
    final Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int cnt = 0;
    for (int i = 0; i <= a && 500 * i <= x; i++) {
      for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      }
    }
    System.out.println(cnt);
  } main {
    final Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int cnt = 0;
    for (int i = 0; i <= a && 500 * i <= x; i++) {
      for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      }
    }
    System.out.println(cnt);
  } final 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 cnt = 0; cnt 0 for (int i = 0; i <= a && 500 * i <= x; i++) {
      for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      }
    } int i = 0; int i = 0; i 0 i <= a && 500 * i <= x i <= a i a 500 * i <= x 500 * i 500 i x i++ i++ i {
      for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      }
    } {
      for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      }
    } for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      } int j = 0; int j = 0; j 0 j <= b && 100 * j <= x - 500 * i j <= b j b 100 * j <= x - 500 * i 100 * j 100 j x - 500 * i x 500 * i 500 i j++ j++ j {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      } {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      } int rem = x - 500 * i - 100 * j; rem x - 500 * i - 100 * j x - 500 * i - 100 * j x 500 * i 500 i 100 * j 100 j if (rem >= 0 && rem / 50 <= c) cnt++; rem >= 0 && rem / 50 <= c rem >= 0 rem 0 rem / 50 <= c rem / 50 rem 50 c cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    final Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();
    int x = scanner.nextInt();

    int cnt = 0;
    for (int i = 0; i <= a && 500 * i <= x; i++) {
      for (int j = 0; j <= b && 100 * j <= x - 500 * i; j++) {
        int rem = x - 500 * i - 100 * j;
        if (rem >= 0 && rem / 50 <= c) cnt++;
      }
    }
    System.out.println(cnt);
  }
}
