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