#include <bits/stdc++.h>
using namespace std;
ifstream fin("in");
int main() {
  int n, l;
  cin >> n >> l;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  sort((v).begin(), (v).end());
  int res = 0;
  for (int i = l; i <= v.back(); ++i) {
    int p = 0;
    for (int j = 0; j < n; ++j) p += v[j] / i;
    res = max(res, i * p);
  }
  cout << res << endl;
}
