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