import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int price = sc.nextInt();
    int count = 0;
    for (int i = 0; i <= fiveHundred; i++) {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    }
    System.out.println(count);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int price = sc.nextInt();
    int count = 0;
    for (int i = 0; i <= fiveHundred; i++) {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    }
    System.out.println(count);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int price = sc.nextInt();
    int count = 0;
    for (int i = 0; i <= fiveHundred; i++) {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    }
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int price = sc.nextInt();
    int count = 0;
    for (int i = 0; i <= fiveHundred; i++) {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    }
    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int fiveHundred = sc.nextInt(); fiveHundred sc.nextInt() sc.nextInt sc int oneHundred = sc.nextInt(); oneHundred sc.nextInt() sc.nextInt sc int fifty = sc.nextInt(); fifty sc.nextInt() sc.nextInt sc int price = sc.nextInt(); price sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 0; i <= fiveHundred; i++) {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    } int i = 0; int i = 0; i 0 i <= fiveHundred i fiveHundred i++ i++ i {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    } {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    } for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      } int j = 0; int j = 0; j 0 j <= oneHundred j oneHundred j++ j++ j {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      } {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      } for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        } int k = 0; int k = 0; k 0 k <= fifty k fifty k++ k++ k {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        } {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        } if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          } (500 * i + 100 * j + 50 * k) == price (500 * i + 100 * j + 50 * k) 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k price {
            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) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int price = sc.nextInt();
    int count = 0;
    for (int i = 0; i <= fiveHundred; i++) {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    }
    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int price = sc.nextInt();
    int count = 0;
    for (int i = 0; i <= fiveHundred; i++) {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    }
    System.out.println(count);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int fiveHundred = sc.nextInt();
    int oneHundred = sc.nextInt();
    int fifty = sc.nextInt();
    int price = sc.nextInt();
    int count = 0;
    for (int i = 0; i <= fiveHundred; i++) {
      for (int j = 0; j <= oneHundred; j++) {
        for (int k = 0; k <= fifty; k++) {
          if ((500 * i + 100 * j + 50 * k) == price) {
            count++;
          }
        }
      }
    }
    System.out.println(count);
  }
}