#include <bits/stdc++.h>
const int INF=1e9,MOD=1e9+7;
const long long LINF=1e18;
using namespace std;
#define int long long
//template
int dp[205][20005];
//main
signed main(){
  int N,W;cin>>N>>W;
  std::vector<int> v(N);
  for(int i=0;i<N;i++)cin>>v[i];
  sort(v.rbegin(),v.rend());
  memset(dp,0,sizeof(dp));
  dp[0][0]=1;
  for(int i=0;i<N;i++){
    for(int j=0;j<=10000;j++){
      dp[i+1][j]+=dp[i][j];
      dp[i+1][j+v[i]]+=dp[i][j];
      dp[i+1][j+v[i]]%=MOD;
    }
  }
  std::vector<int> w(N+1,0);
  for(int i=N-1;i>=0;i--)w[i]=w[i+1]+v[i];
  if(w[0]<=W){cout<<1<<endl;return 0;}
  if(v[N-1]>W){cout<<1<<endl;return 0;}
  int ans=0;
  for(int i=1;i<=N;i++){
    for(int j=0;j<=10000;j++){
      if(W-j-w[i+1]>=0&&W-j-w[i]<0)ans+=dp[i][j];
      ans%=MOD;
    }
  }
  cout<<ans<<endl;
}

