#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
vector<pair<long long, long long> > vp;
int modu = 1000000007;
double dp[2005][2005];
int n, c;
long long power(int b, int e) {
  if (e == 0) return 1;
  if (e & 1)
    return (b * power(b, e - 1)) % modu;
  else {
    long long x = power(b, e / 2);
    return (x * x) % modu;
  }
}
double solve(int n, int p, int r) {
  if (r > n || n < 0) return 0;
  if (r == 0) return p;
  if (fabs(dp[n][r] + 1) > 0.00000001) return dp[n][r];
  return solve(n - 1, p, r - 1) + solve(n - 1, p, r);
}
int main() {
  int n, l;
  cin >> n >> l;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  int ans = 0;
  for (int i = l; i <= 100; i++) {
    int a = 0;
    for (int j = 0; j < n; j++) {
      a += v[j] / i;
    }
    ans = max(ans, a * i);
  }
  cout << ans << endl;
}
