#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e2 + 5;
vector<int> a;
int main() {
  int n, l;
  ios::sync_with_stdio(false);
  while (cin >> n >> l) {
    a.clear();
    int blinds, r = l;
    for (int i = 1; i <= n; ++i) {
      cin >> blinds;
      if (blinds >= l) {
        a.push_back(blinds);
        r = max(r, blinds);
      }
    }
    int ans = 0;
    for (int i = l; i <= r; ++i) {
      int tmp = 0;
      for (int j = 0; j < a.size(); ++j) tmp += (a[j] / i) * i;
      ans = max(ans, tmp);
    }
    cout << ans << "\n";
  }
  return 0;
}
