#include <bits/stdc++.h>
using namespace std;
long long ans;
long long f[21], s;
int n;
const long long Mod = 1000000007;
long long inv[21];
long long fastmul(long long x, long long b) {
  long long ret = 1;
  x %= Mod;
  while (b) {
    if (b & 1) ret = ret * x % Mod;
    x = x * x % Mod, b >>= 1;
  }
  return ret;
}
long long C(long long n, long long m) {
  long long ret = 1;
  for (long long a = n - m + 1; a <= n; ++a) {
    ret = ret * (a % Mod) % Mod;
  }
  ret = ret * (inv[m]) % Mod;
  return ret;
}
long long calc(int msk) {
  long long S = s;
  for (int i = 0; i < n; ++i)
    if ((msk >> i) & 1) S -= f[i] + 1;
  if (S < 0) return 0;
  return C(S + n - 1, n - 1);
}
void prepare() {
  inv[0] = inv[1] = 1;
  long long ss = 1;
  for (int i = 2; i <= 20; ++i) {
    ss = ss * i % Mod;
    inv[i] = fastmul(ss, Mod - 2);
  }
}
int main() {
  prepare();
  ans = 0;
  cin >> n >> s;
  long long sum = 0;
  for (int i = 0; i < n; ++i) cin >> f[i], sum += f[i];
  if (sum < s) {
    printf("0\n");
    return 0;
  }
  for (int i = 0; i < (1 << n); ++i) {
    int cnt = __builtin_popcount(i);
    ans = (ans + (cnt & 1 ? -calc(i) : calc(i))) % Mod;
    if (ans < 0) ans += Mod;
  }
  cout << (ans + Mod) % Mod << endl;
  return 0;
}
