#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    solve();
  }
  return 0;
}
void solve() {
  long long n, m;
  cin >> n >> m;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long area = 0;
  for (long long i = m; i < 101; i++) {
    long long temp = 0;
    for (long long j = 0; j < n; j++) {
      temp += (a[j] / i) * i;
    }
    area = max(temp, area);
  }
  cout << area;
  return;
}
