#include <bits/stdc++.h>
using namespace std;
int i, j, n, l, max1 = 0, max2 = 0, p = 0;
int main() {
  cin >> n >> l;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > max1) max1 = a[i];
  }
  for (i = l; i <= max1; i++) {
    for (j = 0; j < n; j++) p += a[j] / i;
    if (i * p > max2) max2 = i * p;
    p = 0;
  }
  cout << max2 << endl;
  return 0;
}
