import java.util.*;

public class Main {
  public static void main(String[] argd) {
    Scanner sc = new java.util.Scanner(System.in);
    int A = Integer.parseInt(sc.nextLine());
    int B = Integer.parseInt(sc.nextLine());
    int C = Integer.parseInt(sc.nextLine());
    int X = Integer.parseInt(sc.nextLine());
    int count = 0;
    for (int a = 0; a <= A; a++) {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    }
    System.out.println(count);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] argd) {
    Scanner sc = new java.util.Scanner(System.in);
    int A = Integer.parseInt(sc.nextLine());
    int B = Integer.parseInt(sc.nextLine());
    int C = Integer.parseInt(sc.nextLine());
    int X = Integer.parseInt(sc.nextLine());
    int count = 0;
    for (int a = 0; a <= A; a++) {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    }
    System.out.println(count);
  }
} Main public static void main(String[] argd) {
    Scanner sc = new java.util.Scanner(System.in);
    int A = Integer.parseInt(sc.nextLine());
    int B = Integer.parseInt(sc.nextLine());
    int C = Integer.parseInt(sc.nextLine());
    int X = Integer.parseInt(sc.nextLine());
    int count = 0;
    for (int a = 0; a <= A; a++) {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    }
    System.out.println(count);
  } main {
    Scanner sc = new java.util.Scanner(System.in);
    int A = Integer.parseInt(sc.nextLine());
    int B = Integer.parseInt(sc.nextLine());
    int C = Integer.parseInt(sc.nextLine());
    int X = Integer.parseInt(sc.nextLine());
    int count = 0;
    for (int a = 0; a <= A; a++) {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    }
    System.out.println(count);
  } Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) int A = Integer.parseInt(sc.nextLine()); A Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int B = Integer.parseInt(sc.nextLine()); B Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int C = Integer.parseInt(sc.nextLine()); C Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int X = Integer.parseInt(sc.nextLine()); X Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int count = 0; count 0 for (int a = 0; a <= A; a++) {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    } int a = 0; int a = 0; a 0 a <= A a A a++ a++ a {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    } {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    } for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      } int b = 0; int b = 0; b 0 b <= B b B b++ b++ b {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      } {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      } for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        } int c = 0; int c = 0; c 0 c <= C c C c++ c++ c {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        } {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        } int total = 500 * a + 100 * b + 50 * c; total 500 * a + 100 * b + 50 * c 500 * a + 100 * b + 50 * c 500 * a 500 a 100 * b 100 b 50 * c 50 c if (total == X) { count++; } total == X total X { count++; } count++ count System.out.println(count) System.out.println System.out System System.out count String[] argd argd public class Main {
  public static void main(String[] argd) {
    Scanner sc = new java.util.Scanner(System.in);
    int A = Integer.parseInt(sc.nextLine());
    int B = Integer.parseInt(sc.nextLine());
    int C = Integer.parseInt(sc.nextLine());
    int X = Integer.parseInt(sc.nextLine());
    int count = 0;
    for (int a = 0; a <= A; a++) {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    }
    System.out.println(count);
  }
} public class Main {
  public static void main(String[] argd) {
    Scanner sc = new java.util.Scanner(System.in);
    int A = Integer.parseInt(sc.nextLine());
    int B = Integer.parseInt(sc.nextLine());
    int C = Integer.parseInt(sc.nextLine());
    int X = Integer.parseInt(sc.nextLine());
    int count = 0;
    for (int a = 0; a <= A; a++) {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    }
    System.out.println(count);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] argd) {
    Scanner sc = new java.util.Scanner(System.in);
    int A = Integer.parseInt(sc.nextLine());
    int B = Integer.parseInt(sc.nextLine());
    int C = Integer.parseInt(sc.nextLine());
    int X = Integer.parseInt(sc.nextLine());
    int count = 0;
    for (int a = 0; a <= A; a++) {
      for (int b = 0; b <= B; b++) {
        for (int c = 0; c <= C; c++) {
          int total = 500 * a + 100 * b + 50 * c;
          if (total == X) { count++; }
        }
      }
    }
    System.out.println(count);
  }
}
