#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, l, res = 0;
  cin >> n >> l;
  vector<long long int> vec(n);
  for (long long int i = 0; i < ((long long int)(n)); i++) cin >> vec[i];
  for (long long int i = 0; i < ((long long int)(105)); i++)
    if (l <= i) {
      long long int tmp = 0;
      for (long long int j = 0; j < ((long long int)(n)); j++)
        tmp += vec[j] / i;
      res = max(res, tmp * i);
    }
  cout << res << endl;
}
