#include <bits/stdc++.h>
using namespace std;
int n, l, a[101];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> l;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int ans = 0;
  for (int k = l; k <= 100; ++k) {
    int cur = 0;
    for (int i = 1; i <= n; ++i) {
      if (a[i] < k) continue;
      cur = cur + ((a[i] / k) * k);
    }
    ans = max(ans, cur);
  }
  cout << ans;
  return 0;
}
