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