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