#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, l, i, a[150], length, Max = 0, j;
  cin >> n >> l;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = l; i < 100; i++) {
    length = 0;
    for (j = 0; j < n; j++) length += a[j] / i;
    if (length * i > Max) Max = length * i;
  }
  cout << Max;
}
