#include <bits/stdc++.h>
using namespace std;
int n, l;
int a[105];
int main() {
  cin >> n >> l;
  int temp;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + 1 + cnt);
  int pos;
  int squ = 0, h = 0, w = 0;
  for (int i = l; i <= 100; i++) {
    w = i;
    h = 0;
    for (int j = 1; j <= n; j++) {
      h += a[j] / w;
    }
    squ = max(squ, w * h);
  }
  cout << squ;
  return 0;
}
