#include <bits/stdc++.h>
using namespace std;
int n, l, a[101], res = 0, endres = 0;
int main() {
  cin >> n >> l;
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = l; i < 101; ++i) {
    res = 0;
    for (int j = 0; j < n; ++j) res += a[j] / i;
    endres = max(endres, res * i);
  }
  cout << endres;
  return 0;
}
