#include <bits/stdc++.h>
using namespace std;
int x, y, i, a, d[200], m = 0, j;
int main() {
  cin >> x >> y;
  for (i = 0; i < x; i++) {
    cin >> a;
    for (j = y; j <= a; j++) {
      d[j] += a / j;
      if (d[j] * j > m) m = d[j] * j;
    }
  }
  cout << m;
  return 0;
}
