#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-5;
int main(void) {
  int n, l, a[100];
  cin >> n >> l;
  for (int i = (0); i < (int)(n); ++i) {
    cin >> a[i];
  }
  int summ = 0;
  for (int k = (l); k < (int)(101); ++k) {
    int sum = 0;
    for (int i = (0); i < (int)(n); ++i) {
      if (a[i] >= k) {
        sum += a[i] / k * k;
      }
    }
    summ = max(summ, sum);
  }
  cout << summ << endl;
  return 0;
}
