#include <bits/stdc++.h>
using namespace std;
inline long long mod(long long n, long long m) {
  long long ret = n % m;
  if (ret < 0) ret += m;
  return ret;
}
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long exp(long long a, long long b, long long m) {
  if (b == 0) return 1;
  if (b == 1) return mod(a, m);
  long long k = mod(exp(a, b / 2, m), m);
  if (b & 1) {
    return mod(a * mod(k * k, m), m);
  } else
    return mod(k * k, m);
}
const long long M = 1e9 + 7;
long long n, s;
long long f[25];
long long inv[25];
long long fat[25];
long long solve(long long id, long long R, long long qtd) {
  if (id == n + 1) {
    long long mul = (qtd % 2 == 0);
    long long prod = 1;
    if ((s + n - 1 - R) < (n - 1)) return 0;
    for (long long i = s + n - 1 - R; i > s - R; i--)
      prod = (1LL * prod * (i % M)) % M;
    prod = mod(1LL * prod * inv[n - 1], M);
    return (mul ? 1 : -1) * prod;
  }
  return mod(solve(id + 1, R + f[id], qtd + 1) + solve(id + 1, R, qtd), M);
}
int32_t main() {
  cin >> n >> s;
  fat[0] = 1;
  inv[0] = 1;
  for (long long i = 1; i <= n; i++) {
    cin >> f[i];
    f[i]++;
    fat[i] = mod(i * fat[i - 1], M);
    inv[i] = exp(fat[i], M - 2, M);
  }
  cout << mod(solve(1, 0, 0), M) << endl;
}
