import java.util.*;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int N = sc.nextInt();
    int count = 0;

    for (int i = 0; i < A+1; i++) {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    }

    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 A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int N = sc.nextInt();
    int count = 0;

    for (int i = 0; i < A+1; i++) {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    }

    System.out.println(count);
  }
} Main public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int N = sc.nextInt();
    int count = 0;

    for (int i = 0; i < A+1; i++) {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    }

    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);

    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int N = sc.nextInt();
    int count = 0;

    for (int i = 0; i < A+1; i++) {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    }

    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 0; i < A+1; i++) {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    } int i = 0; int i = 0; i 0 i < A+1 i A+1 A 1 i++ i++ i {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    } {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    } if (N - i * 500 < 0) {
        break;
      } N - i * 500 < 0 N - i * 500 N i * 500 i 500 0 {
        break;
      } break; for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      } int j = 0; int j = 0; j 0 j < B+1 j B+1 B 1 j++ j++ j {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      } {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      } if (N - i * 500 - j * 100 < 0) {
          break;
        } N - i * 500 - j * 100 < 0 N - i * 500 - j * 100 N - i * 500 - j * 100 N i * 500 i 500 j * 100 j 100 0 {
          break;
        } break; for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        } int k = 0; int k = 0; k 0 k < C+1 k C+1 C 1 k++ k++ k {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        } {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        } if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          } N - i * 500 - j * 100 - k * 50 < 0 N - i * 500 - j * 100 - k * 50 j * 100 N - i * 500 - j * 100 - k * 50 N i * 500 i 500 j * 100 j 100 k * 50 k 50 0 {
            break;
          } break; if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          } N - i * 500 - j * 100 - k * 50 == 0 N - i * 500 - j * 100 - k * 50 j * 100 N - i * 500 - j * 100 - k * 50 N i * 500 i 500 j * 100 j 100 k * 50 k 50 0 {
            count += 1;
          } count += 1 count 1 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 A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int N = sc.nextInt();
    int count = 0;

    for (int i = 0; i < A+1; i++) {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    }

    System.out.println(count);
  }
} public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int N = sc.nextInt();
    int count = 0;

    for (int i = 0; i < A+1; i++) {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    }

    System.out.println(count);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int N = sc.nextInt();
    int count = 0;

    for (int i = 0; i < A+1; i++) {
      if (N - i * 500 < 0) {
        break;
      }

      for (int j = 0; j < B+1; j++) {
        if (N - i * 500 - j * 100 < 0) {
          break;
        }

        for (int k = 0; k < C+1; k++) {
          if (N - i * 500 - j * 100 - k * 50 < 0) {
            break;
          } else if (N - i * 500 - j * 100 - k * 50 == 0) {
            count += 1;
          }
        }
      }
    }

    System.out.println(count);
  }
}
