#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
const ll inf = 9223372036854775807;
const ll mininf = -9223372036854775807;
const ll nax = 1e5 + 5;

ll n, k, memo[105][nax], arr[105];

ll dp(ll i, ll j){
	if (j == 0){
		return 1;
	}
	if (j < 0){
		return 0;
	}
	if (i == 0){
		return 0;
	}
	if(memo[i][j] != -1){
		return memo[i][j];
	}
	ll ret = ((dp(i-1, j) + dp(i, j-1) % mod) - (dp(i - 1, j - arr[i] - 1) % mod) % mod;
	return memo[i][j] = ret;
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(); cout.tie();

	cin >> n >> k;
	for (ll i = 1; i <= n; i++){
		cin >> arr[i];
	}
	sort(arr+1, arr+n+1);
	memset(memo, -1, sizeof(memo));
	cout << dp(n, k) << '\n';
}
  