#include using namespace std; #define rep(i,n) for(int i=0;i<(int)n;i++) typedef long long ll; ll n,L,res; ll dp[1000010]; int main(){ cin >> n >> L; vectorw(n); rep(i,n)cin >> w[i]; sort(w.begin(),w.end()); fill(dp,dp+w[0],(1LL<<60)); dp[0] = 0; rep(i,n-1){ int x = w[i+1]%w[0]; int g = __gcd(w[0],w[i+1]); for(int s=0;s=w[0])p -= w[0]; dp[p] = min(dp[p],dp[t]+w[i+1]); t = p; } } } rep(i,w[0]){ res += max(0ll,(L-i)/w[0] - (dp[i]-i + w[0]-1)/w[0] + 1); } cout << res-1 << endl; return 0; }