#include <bits/stdc++.h>
using namespace std;
long long f[20], jv, n;
inline long long pow(long long, long long), take(long long);
int main() {
  long long s, ans(0);
  int i, j, li;
  scanf("%lld%lld", &n, &s), li = (1 << n) - 1;
  for (i = 0; i < n; ++i) scanf("%lld", &f[i]);
  for (i = jv = 1; i < n; ++i) (jv *= i) %= 1000000007;
  jv = pow(jv, 1000000007 - 2);
  for (i = 0; i <= li; ++i) {
    long long lsy(n + s - 1), xs(1);
    for (j = n - 1; j >= 0; --j)
      if (i >> j & 1) lsy -= f[j] + 1, xs *= -1;
    (ans += xs * take(lsy)) %= 1000000007;
  }
  printf("%lld", (ans + 1000000007) % 1000000007);
  return 0;
}
inline long long take(long long x) {
  if (x < n - 1) return 0;
  long long ans(1);
  x %= 1000000007;
  for (long long i(x - n + 2); i <= x; ++i) (ans *= i) %= 1000000007;
  return ans * jv % 1000000007;
}
inline long long pow(long long x, long long y) {
  long long ans(1);
  while (y) {
    if (y & 1) (ans *= x) %= 1000000007;
    (x *= x) %= 1000000007, y >>= 1;
  }
  return ans;
}
