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