#include <bits/stdc++.h>
using namespace std;
const int INF = (1 << 30) - 1;
const long long LINF = (1LL << 61) - 1;
const double EPS = 1e-10;
const int N = 21, P = 1e9 + 7;
int n;
long long s, f[N], inv[N];
long long ans = 0;
inline long long qpow(long long base, long long k) {
  long long res = 1;
  while (k) {
    if (k & 1) res *= base, res %= P;
    base *= base, base %= P, k >>= 1;
  }
  return res;
}
void preproc() {
  inv[0] = 1;
  long long fac = 1;
  for (int i = 1; i < N; i++) fac = fac * i % P, inv[i] = qpow(fac, P - 2);
}
inline long long C(long long n, int m) {
  if (n < m) return 0;
  long long res = 1;
  for (long long i = n - m + 1; i <= n; i++) res *= (i % P), res %= P;
  res *= inv[m];
  return res % P;
}
int main() {
  preproc();
  cin >> n >> s;
  for (int i = 0; i < n; i++) cin >> f[i];
  for (int mask = 0; mask < (1 << n); mask++) {
    long long ss = s, flag = 1, ele = 0;
    for (int i = 0; i < n; i++) {
      if (mask >> i & 1) {
        ss -= f[i] + 1;
        flag *= -1;
      }
    }
    if (ss < 0) continue;
    ans += C(ss + n - 1, n - 1) % P * flag;
    ans %= P;
  }
  while (ans < 0) ans += P;
  cout << ans << endl;
  return 0;
}
