#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  cin >> n >> s;
  vector<int> a(0);
  for (int i = 0; i < n; ++i) {
    int k;
    cin >> k;
    if (k >= s) a.push_back(k);
  }
  int res = 0;
  for (int i = s; i <= 100; ++i) {
    int t = 0;
    for (int j = 0; j < ((int)a.size()); ++j) t += a[j] / i;
    res = max(res, t * i);
  }
  cout << res;
  return 0;
}
