#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  solve();
  return 0;
}
void solve() {
  long long int n, l, a[111];
  cin >> n >> l;
  for (long long int i = 0; i < n; ++i) cin >> a[i];
  long long int best = 0;
  for (long long int i = l; i <= 100; ++i) {
    long long int ans = 0;
    for (long long int j = 0; j < n; ++j) {
      ans += a[j] / i;
    }
    best = max(best, ans * i);
  }
  cout << best;
}
