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