#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 7;
const int mod2 = 998244353;
const int mx = 22;
long long n, s;
long long a[mx], fact[mx], inv[mx];
long long binpow(long long b, int exp) {
  b %= mod;
  long long res = 1ll;
  while (exp) {
    if (exp & 1) res = (res * b) % mod;
    b = (b * b) % mod;
    exp >>= 1;
  }
  return res % mod;
}
long long nck(long long n, int k) {
  if (n < k || k < 0) return 0;
  long long res = 1ll;
  for (int i = 0; i < k; ++i) {
    res = res * ((n - i) % mod);
    res %= mod;
  }
  res = (res * inv[k]) % mod;
  return res;
}
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  fact[0] = 1ll;
  inv[0] = 1ll;
  for (int i = 1; i <= n; ++i) {
    fact[i] = (i * fact[i - 1]) % mod;
    inv[i] = binpow(fact[i], mod - 2);
  }
  long long res = nck(s + n - 1, n - 1) % mod;
  int NX = 1 << n;
  for (int mask = 1; mask < NX; ++mask) {
    long long groupMX = 0;
    int set_bits = 0;
    for (int bit = 0; bit < n; ++bit) {
      if ((1 << bit) & mask) {
        set_bits++;
        groupMX += a[bit] + 1;
      }
    }
    long long comp = nck(s + n - 1 - groupMX, n - 1);
    res = res - (set_bits & 1 ? comp : -comp);
    if (res >= mod)
      res -= mod;
    else if (res < 0)
      res += mod;
  }
  cout << res << endl;
  return 0;
}
