/*######################################################
#########~~~~~####~~~~###~~##~~##~~##~~##~~##~~#########
#########~~##~~##~~##~~##~~~#~~##~~~#~~##~~##~~#########
#~~~~~~##~~~~~###~~~~~~##~~#~~~##~~#~~~##~~##~~##~~~~~~#
#########~~######~~##~~##~~##~~##~~##~~##~~##~~#########
#########~~######~~##~~##~~##~~##~~##~~###~~~~##########
######################################################*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#pragma comment(linker, "/stack:268435456")
#pragma GCC optimize("O3")
#define ll long long
#define str string
#define rtn return
#define endl '\n'
#define F first
#define S second
#define pb push_back
#define db long double
#define MOD 1000000007
#define INF 1e18
#define EPS 1e-15
#define pll pair <ll, ll>
#define vi vector<ll>
#define vpll vector<pll>
#define value_at find_by_order
#define index_of order_of_key
#define fill(a,v) memset(a,v,sizeof(a))
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i,n) for(ll i=0;i<n;++i)
#define per(i,n) for(ll i=n-1;i>=0;--i)
#define loop1(i, n) for (int i=1;i<=n;++i)
#define loop(i, begin, end) for (__typeof(end) i = (begin)-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
#define FAST_IO std::ios_base::sync_with_stdio(false);std::cin.tie(NULL);std::cout.tie(NULL)

#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cerr << name << " = " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " = " << arg1 << " |";
  __f(comma+1, args...);
}
#else
#define trace(...)
#endif

template<class T> void remin(T &a, T b) {a = min(a, b);}
template<class T> void remax(T &a, T b) {a = max(a, b);}
template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define N 100005

ll a[105];
ll n, k;

inline ll fme (ll a, ll b, ll m = MOD) {ll r = 1; a %= m; while (b > 0) {if (b & 1){r *= a; r %= m;} a *= a; a %= m; b >>= 1;} rtn r % m;}
ll fact[1000001], invfact[1000001];
inline void init (){ll i; fact[0] = 1; for (i = 1; i <= 1000000; i++) fact[i] = (fact[i - 1] * i) % MOD;
	invfact[1000000] = fme (fact[1000000], MOD - 2, MOD); for (i = 1000000 - 1; i >= 0; i--) invfact[i] = (invfact[i + 1] * (i + 1)) % MOD;}
inline ll nCk (ll n, ll k){rtn (((fact[n] * invfact[k]) % MOD) * invfact[n - k]) % MOD;}

int main() {
  //FAST_IO;
  init();
  cin >> n >> k;
  rep(i, n) cin >> a[i];
  sort(a, a + n);
  ll ans = 0;
  rep(i, n-1) {
    int res = (n - i);
    int gx = min(k, a[i]);
    for (int j = i + 1; j < n; j++) a[j] -= gx;
    k -= gx;
    ans = ans + nCk(gx + res - 1, res - 1);
    ans %= MOD;
    if (k == 0) break;
  }
  cout << ans;
  rtn 0;
}
