#include<deque>
#include<list>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
#include<sstream>
#include<cmath>
#include<cstdio>
#include<cstring>
using namespace std;
int a[200],n,m;
vector<vector<int> > b;
int fi(int p,int q){
  if(b[p][q]>=0)
    return b[p][q];
  int sm=fi(p+1,q);
  if(q+a[p]<=m)
    sm=(sm+fi(p+1,q+a[p]))%1000000007;
  return b[p][q]=sm;
}
int main(){
  int i;
  //int n,m;
  cin>>n>>m;
  //int a[200];
  for(i=0;i<n;++i)
    cin>>a[i];
  sort(a,a+n);
  int sm=0,tm=0;
  for(i=0;i<n;++i){
    //vector<vector<int> > b;
    b.assign(n+1,vector<int>(m+1,-1));
    fill(&b[n][0],&b[n][0]+m-a[i]+1,0);
    fill(&b[n][0]+m-a[i]+1,&b[n][0]+m+1,1);
    sm=(sm+fi(i+1,tm))%1000000007;
    tm+=a[i];
    if(tm>m)
      break;
  }
  if(tm<=m)
    sm=(sm+1)%1000000007;
  cout<<sm<<endl;
  return 0;
}