#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
template <class T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
const double EPS = 1e-9;
const double PI = acos(-1.0);
int in[110];
int main(void) {
  int n, l, x;
  cin >> n >> l;
  int mx = 0;
  for (int i = 0; i < int(n); i++) cin >> in[i];
  for (int i = l; i < 101; i++) {
    int cnt = 0;
    for (int j = 0; j < n; j++) cnt += in[j] / i;
    mx = max(mx, cnt * i);
  }
  cout << mx << endl;
  return 0;
}
