#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<int,int> PI;
const double EPS=1e-6;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define F first
#define S second
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define SZ(a) (int)((a).size())
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) a.rbegin(),a.rend()
#define FLL(a,b) memset((a),b,sizeof(a))
#define CLR(a) FLL(a,0)
#define declare(a,it) __typeof(a) it=(a)
#define FOR(it,a) for(declare(a.begin(),it);it!=a.end();++it)
#define FORR(it,a) for(declare(a.rbegin(),it);it!=a.rend();++it)
template<class T,class U> ostream& operator<< (ostream& o, const pair<T,U>& v){return o << "(" << v.F << ", " << v.S << ")";}
template<class T> ostream& operator<< (ostream& o, const vector<T>& v){o << "{";rep(i,SZ(v)) o << (i?", ":"") << v[i];return o << "}";}
int dx[]={0,1,0,-1,1,1,-1,-1};
int dy[]={1,0,-1,0,-1,1,1,-1};
int s2i(string& a){stringstream ss(a);int r;ss>>r;return r;}
int geti(){int n;scanf("%d", &n);return n;}

int w[200];
ll dp[20000];
const ll mod = 1e9 + 7;

ll modpow(ll p, ll n, ll mod){
  ll ret = 1;
  while(n){
    if(n&1) ret = (ret*p)%mod;
    p = p*p % mod;
    n >>= 1;
  }
  return ret;
}


ll inv(ll p, ll mod){// mod is prime
  return modpow(p, mod-2, mod);
}

ll fact[1000];
ll invf[1000];

ll com(ll n, ll k){
  return fact[n] * invf[k] % mod * invf[n-k] % mod;
}

int main(){
  fact[0] = 1;
  for(int i = 1; i < 1000; ++i){
    fact[i] = i*fact[i-1] % mod;
    invf[i-1] = inv(fact[i-1], mod);
  }
  
  
  int n,W;
  cin >> n >> W;
  for(int i = 0; i < n; ++i)
    cin >> w[i];
  ll ans = 0;
  sort(w, w+n);
  //ans += w[0] > W;
  reverse(w, w+n);
  
  dp[0] = 1;
  
  ll su = accumulate(w, w+n, 0);
  ans += su <= W;
  
  for(int i = 0; i < n;){
    int j = 0;
    while(i+j < n && w[i] == w[i+j]) ++j;
    su -= w[i] * j;

    for(int k = 1; k <= j; ++k){
      for(int tw = 0; tw <= W; ++tw){
        if(tw + (k-1)*w[i] + su <= W &&
           tw + (k)*w[i] + su > W)
          ans += dp[tw] * com(j,k-1) % mod;
      }
    }
    
    for(int tw = W; tw >= 0; --tw){
      for(int k = 1; k <= j; ++k){
        if(tw - k*w[i] >= 0)
          dp[tw] = (dp[tw] + dp[tw-k*w[i]] * com(j,k) % mod) %mod;
      }
    }
    
    
    ans %= mod;
    
    i += j;
  }
  
  cout << ans << endl;
}