#include <bits/stdc++.h>
using namespace std;
template <typename T>
struct Point {
  T x, y;
  Point() {}
  Point(T xx, T yy) : x(xx), y(yy) {}
};
template <typename T>
bool operator<(const Point<T> &p1, const Point<T> &p2) {
  return p1.x < p2.x || p1.x == p2.x && p1.y < p2.y;
}
template <typename T>
Point<T> operator-(const Point<T> &p1, const Point<T> &p2) {
  return Point<T>(p1.x - p2.x, p1.y - p2.y);
}
template <typename T>
T operator^(const Point<T> &p1, const Point<T> &p2) {
  return p1.x * p2.y - p2.x * p1.y;
}
vector<int> v;
int main() {
  int n, l;
  cin >> n >> l;
  v.resize(n);
  for (int(i) = 0; (i) < n; i++) cin >> v[i];
  int res = 0;
  sort(v.begin(), v.end());
  for (int i = l; i <= v.back(); i++) {
    int width = 0;
    for (int j = 0; j < n; j++) {
      width += v[j] / i;
    }
    res = max(res, width * i);
  }
  cout << res;
  return 0;
}
