#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> P3;
const ll MOD = ll(1e9+7);
const int IINF = INT_MAX;
const ll LLINF = LLONG_MAX;
const int MAX_N = int(1e4 + 5);
const double EPS = 1e-8;
const int di[] = {0, 1, 0, -1}, dj[] = {1, 0, -1, 0};
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define SORT(v) sort((v).begin(), (v).end())
#define ALL(v) (v).begin(), (v).end()

ll n, W, w[205], cum[205], dp[205][10005];

ll rec(int i, int j){
    if(dp[i][j]>=0) return dp[i][j];
    if(i==n || j==0) return 1;
    ll res = 0;
    if(j>=w[i]){  // 使う遷移
        res += rec(i+1,j-w[i])%MOD;
    }
    if(j-cum[i+1] < w[i]){  //使わない遷移
        res += rec(i+1,j)%MOD;
    }
    return dp[i][j] = res;
}

int main() {
    cin >> n >> W;
    REP(i,n) cin >> w[i];
    sort(w,w+n);
    reverse(w,w+n);
    REPR(i,n-1) cum[i] = cum[i+1] + w[i];
    REP(i,n+1)fill(dp[i],dp[i]+W+1,-1);
    cout << rec(0,W) << endl;
    return 0;
}

