#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;

#define MOD 1000000007

int N, W;
int w[201];
int dp[202][10002];

int main(){
  while(cin >> N >> W){
    for(int i = 0; i < N; i++){
      cin >> w[i];
    }

    sort(w, w + N);
    memset(dp, 0, sizeof(dp));
    dp[N][0] = 1;

    for(int i = N; i > 0; i--){
      for(int j = 0; j <= W; j++){
        if(dp[i][j] == 0){
          continue;
        }

        if(j + w[i - 1] <= W){
          dp[i - 1][j + w[i - 1]] += dp[i][j];
          dp[i - 1][j + w[i - 1]] %= MOD;
        }
        dp[i - 1][j] += dp[i][j];
        dp[i - 1][j] %= MOD;
      }
    }

    int ans = 0;
    int sum = 0;

    for(int i = 0; i < N; i++){
      for(int j = W - w[i] - sum + 1; j <= W - (i == 0 ? 0 : w[i - 1]) - sum; j++){
        if(j < 0 || W < j){
          continue;
        }

        ans += dp[i][j];
        ans %= MOD;
      }
      sum += w[i];
    }

    cout << ans << endl;
  }
}