#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)n;i++) typedef long long ll; int main(){ ll n,L,res = 0; cin >> n >> L; vector<ll>w(n); rep(i,n)cin >> w[i]; sort(w.begin(),w.end()); vector<ll> dp(w[0],(1LL<<60)); dp[0] = 0; rep(i,n-1){ int g = __gcd(w[0],w[i+1]); for(int s=0;s<g;s++){ int t = s; rep(zz,2*w[0]/g){ dp[(t+w[i+1])%w[0]] = min(dp[(t+w[i+1])%w[0]],dp[t]+w[i+1]); t = (t+w[i+1])%w[0]; } } } 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; }