#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, l;
  cin >> n >> l;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int k = 0, s = 0;
  for (int i = 0; i < n; i++) k += v[i] / l;
  s = k * l;
  do {
    k = 0;
    l++;
    for (int i = 0; i < n; i++) k += v[i] / l;
    s = max(s, k * l);
  } while (k * l != 0);
  cout << s;
  return 0;
}
