#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") #include using namespace std; #define rep(i,n) for(int i=0;i>n>>L; rep(i,n)cin>>w[i]; sort(w,w+n); fill(dp,dp+w[0],(1LL<<60)); dp[0]=0; rep(i,n-1){ int x=w[i+1]%w[0]; if(flag[x])continue; int g=__gcd(w[0],w[i+1]); for(int s=0;s=w[0])p-=w[0]; if(dp[p]<=dp[t]+w[i+1]&&zz>=w[0]/g)break; dp[p]=min(dp[p],dp[t]+w[i+1]); t=p; } } } dp[0]=w[0]; rep(i,w[0]){ if(L>=dp[i])res+=(L-dp[i])/w[0]+1; } cout<