#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
const double eps = 1e-6;
const int inf = 0x3fffffff;
const long long mod = 1000000007;
int n;
long long s, a[maxn];
long long inv(long long x) {
  return x == 1 ? 1 : (mod - mod / x) * inv(mod % x) % mod;
}
long long C(long long A, long long B) {
  if (A < 0 || B > A || B < 0) return 0;
  long long res = 1;
  for (long long i = A; i > A - B; --i) res *= i % mod, res %= mod;
  for (long long i = 1; i <= B; ++i) res *= inv(i), res %= mod;
  return res;
}
int main() {
  while (~scanf("%d%lld", &n, &s)) {
    for (int i = 0; i < n; i++) scanf("%lld", &a[i]);
    long long ret = 0;
    for (int i = 0; i < (1 << n); i++) {
      int cnt = 0;
      long long tt = 0;
      for (int j = 0; j < n; j++)
        if (i & (1 << j)) {
          tt += a[j] + 1;
          cnt++;
        }
      if (tt > s) continue;
      if (cnt & 1)
        ret = (ret + mod - C(s - tt + n - 1, n - 1)) % mod;
      else
        ret = (ret + C(s - tt + n - 1, n - 1)) % mod;
    }
    printf("%lld\n", ret);
  }
  return 0;
}
