#include <bits/stdc++.h>
using namespace std;
const long long M = 110;
const long long mod = 1e9 + 7;
long long a[M], inv[M], ans;
long long mul(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
long long C(long long n, long long m) {
  if (n < 0 || m < 0 || n < m) return 0;
  if (m == 0 || n % mod == 0) return 1;
  long long res = 1;
  for (long long i = n - m + 1; i <= n; i++) res = res * (i % mod) % mod;
  for (long long i = 1; i <= m; i++) res = res * inv[i] % mod;
  return res;
}
void init() {
  for (long long i = 1; i <= 100; i++) inv[i] = mul(i, mod - 2);
}
signed main() {
  long long n, m;
  init();
  scanf("%lld%lld", &n, &m);
  for (long long i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (long long i = 0; i < (1 << n); i++) {
    if (i == 0)
      ans = (ans + C(n + m - 1, n - 1)) % mod;
    else {
      long long t = n + m, p = 0;
      for (long long j = 0; j < n; j++)
        if ((i >> j) & 1) {
          p++;
          t -= a[j + 1];
        }
      t -= p + 1;
      if (p & 1)
        ans = (ans - C(t, n - 1)) % mod;
      else
        ans = (ans + C(t, n - 1)) % mod;
    }
  }
  printf("%lld\n", (ans % mod + mod) % mod);
  return 0;
}
