#include <bits/stdc++.h>
const long long MOD = 1000000007;
using namespace std;
long long jcn_1 = 1, inv_jcn_1, n, f[100], s, ans = 0;
long long pow(long long a, long long b) {
  long long ans = 1;
  a %= MOD;
  while (b) {
    if (b & 1) ans = (ans * a) % MOD;
    a = (a * a) % MOD;
    b >>= 1;
  }
  return ans;
}
long long C(long long k) {
  long long ans = 1;
  for (long long i = s - k + 1; i <= n + s - k - 1; i++)
    ans = (ans * (i % MOD)) % MOD;
  return ans * inv_jcn_1 % MOD;
}
void dfs(long long pos, long long opt, long long x) {
  if (pos == n) {
    if (x > s) return;
    ans = ((ans + opt * C(x)) % MOD + MOD) % MOD;
    return;
  }
  dfs(pos + 1, opt, x);
  dfs(pos + 1, -opt, x + f[pos + 1] + 1);
}
signed main() {
  scanf("%I64d %I64d", &n, &s);
  for (long long i = 1; i < n; i++) jcn_1 *= i;
  inv_jcn_1 = pow(jcn_1, MOD - 2);
  for (long long i = 1; i <= n; i++) scanf("%I64d", &f[i]);
  dfs(0, 1, 0);
  printf("%I64d\n", ans);
  return 0;
}
