private long calc(int pos, int n) {
    if (pos < numbers.length && (pos + n - 1) < numbers.length) {
      long v = 1;
      for (int i = pos - 1; i < pos + n - 1; i++) {
        v *= numbers[i];
      }
      return v;
    }
    return 0;
  }