#include <bits/stdc++.h>
using namespace std;
long long modexp(long long b, long long e) {
  if (e == 0) return 1;
  if (e % 2) {
    return (b * modexp(b, e - 1)) % 1000000007LL;
  }
  long long tmp = modexp(b, e / 2);
  return (tmp * tmp) % 1000000007LL;
}
int main() {
  long long n, s;
  cin >> n >> s;
  long long f[n];
  for (long long i = 0; i < n; ++i) {
    cin >> f[i];
  }
  long long fac[n + 1];
  long long invFac[n + 1];
  fac[0] = 1;
  invFac[0] = 1;
  for (long long i = 1; i <= n; ++i) {
    fac[i] = (i * fac[i - 1]) % 1000000007LL;
    invFac[i] = modexp(fac[i], 1000000007LL - 2);
  }
  unordered_map<long long, long long> co;
  for (long long mask = 0; mask < (1LL << n); ++mask) {
    long long sum = 0;
    bool sign = true;
    for (long long i = 0; i < n; ++i) {
      if (mask & (1 << i)) {
        sign = !sign;
        sum += (f[i] + 1);
      }
    }
    if (co.find(sum) == co.end()) {
      co.insert({sum, 0});
    }
    if (sign)
      ++co[sum];
    else
      --co[sum];
  }
  long long rs = 0;
  for (auto it : co) {
    long long index = it.first;
    long long value = it.second;
    if (n + s - index - 1 < 0 || s - index < 0) continue;
    long long x = invFac[n - 1];
    for (long long j = 1; j < n; ++j) {
      x = (x * ((s - index + j) % 1000000007LL)) % 1000000007LL;
    }
    rs = (rs + 1000000007LL * 1000000007LL + (value % 1000000007LL) * x) %
         1000000007LL;
  }
  cout << rs << endl;
  return 0;
}
