#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, l, d[101] = {}, s = 0, h = 0, max = -1, max1 = -1;
  cin >> n >> l;
  for (int i = 0; i < n; i++) cin >> d[i];
  for (int i = 0; i < n; i++)
    if (max1 < d[i]) max1 = d[i];
  for (int j = 0; j <= max1 - l; j++) {
    s = 0;
    for (int i = 0; i < n; i++) {
      h = l + j;
      s += d[i] / (h);
    }
    if (max < (s * (l + j))) max = s * (l + j);
  }
  if (max == -1)
    cout << "0";
  else
    cout << max;
  return 0;
}
