#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, n;
  cin >> n >> l;
  int a;
  int sum[100];
  for (int i = 0; i < 100; ++i) sum[i] = 0;
  memset(sum, 0, 100);
  for (int i = 0; i < n; ++i) {
    cin >> a;
    for (int j = l; j <= 100; ++j) {
      sum[j - 1] = sum[j - 1] + (a / j) * j;
      if (a < j) break;
    }
  }
  int maxx = sum[l - 1];
  for (int i = l; i < 100; ++i)
    if (sum[i] > maxx) maxx = sum[i];
  cout << maxx;
  return 0;
}
