#include <bits/stdc++.h>
using namespace std;
const int maxn = 25, Mod = 1e9 + 7;
long long n, k, a[maxn], bit[maxn];
long long Fact[maxn], Inv;
void Init();
void Prework();
long long C(long long, long long);
long long Pow(long long, long long);
int main() {
  Init();
  return 0;
}
void Init() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    bit[i] = 1 << (i - 1);
  }
  Prework();
  long long ans = 0, All = (1 << n) - 1;
  for (int S = 0; S <= All; S++) {
    long long tmp = 0, flag = 1;
    for (int i = 1; i <= n; i++)
      if (S & bit[i]) tmp += a[i] + 1, flag = -flag;
    ans = (ans + flag * C(k - tmp, n) % Mod + Mod) % Mod;
  }
  cout << ans << endl;
}
void Prework() {
  Fact[0] = 1;
  for (int i = 1; i <= n; i++) Fact[i] = Fact[i - 1] * i % Mod;
  Inv = Pow(Fact[n - 1], Mod - 2);
}
long long Pow(long long x, long long p) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = ans * x % Mod;
    x = x * x % Mod;
    p >>= 1;
  }
  return ans;
}
long long C(long long n, long long m) {
  if (n < 0) return 0;
  long long ans = 1;
  for (long long i = n + 1; i <= n + m - 1; i++) ans = i % Mod * ans % Mod;
  ans = ans * Inv % Mod;
  return ans;
}
