#include <bits/stdc++.h>
using namespace std;
const int m =1e9+7;
int N=1e6+1;
vector<vector> dp(N, vector(101, 0));
int main() {
int n, x;
cin >> n >> x;
vector arr(n);
for(auto &it:arr) cin>>it;
for(int i=0;i<n;++i) dp[0][i]=1;
for(int sum = 1; sum<=x; ++sum) {
int count=0;
for(int i=0; i<n; ++i) {
if(sum-arr[i] >= 0) count+=(dp[sum-arr[i]][i]);
count %= m;
dp[sum][i] = count;
}
}
cout<<dp[x][n-1];
return 0;
}