#include#includeusing namespace std;int changes[6];int dp[1001];int dp1[1001];int main() { int n, m; cin >> n >> m; for (int i = 0; i < n; i++) cin >> changes[i]; dp1[m] = 1; for (int i = 0; i < n; i++) { int k = 0; int cnt = m; for (int j = 1; j * changes[i] <= m; j++) { dp1[m-j*changes[i]] = dp1[m - j * changes[i]] + dp1[0]; } } cout << dp1[m];}//if(j*changes[i]+changes[i+1]){// dp[++dp[0]]=j*changes[i]+changes[i+1]