#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
#define rep(i,n) REP(i, 0, n)
const int MOD = 1000000007;
int sum[201], w[200];
int dp[10010];
int main() {
    int N, W; scanf("%d%d", &N, &W);
    rep(i, N) scanf("%d", w + i);
    sort(w, w + N);
    sum[0] = 0;
    rep(i, N) sum[i + 1] = sum[i] + w[i];
    if(sum[N] <= W) {
        puts("1");
        return 0;
    }
    memset(dp, 0, sizeof(dp));
    dp[0] = 1; int ans = 0;
    for(int i = N - 1; i >= 0; --i) {
        for(int j = W; j >= 0; --j) {
            if(sum[i] + j <= W && sum[i] + j > W - w[i])
              ans = (ans + dp[j]) % MOD;
            if(j >= w[i]) dp[j] = (dp[j] + dp[j - w[i]]) % MOD;
        }
    }
    printf("%d\n", ans);
    return 0;
}