#include <bits/stdc++.h>
#define int long long
using namespace std;
inline void solve(){
int n,k; cin>>n>>k;
vector<int>v(n);
set<int>s;
map<int,int>m;
for(int i = 0; i<n; i++){cin>>v[i];
s.insert(v[i]);
}
int ans = 0;
for(auto to: s){
int c = 0;
int sq = sqrt(to);
int ktr = min(to,k);
for(int j = 1; j<=ktr; j++){
if(((to/j)*(to+2))>100000000)c+=100000000;
else {
if((to/j)*(to+2)==to+3){
c+=(to+3)*(j-ktr);
break;
}else c+= (to/j)*(to+2);
}
// cout<<(to/j)*(to+2)<<' ';
}
// cout<<endl;
ans+=c;
}
cout<<ans<<endl;
}
signed main(){
solve();
return 0;
}