#include <bits/stdc++.h>
using namespace std;
int main() {
  int lenght[128];
  int n, l, maxx = -1;
  scanf("%d %d", &n, &l);
  for (int i = 0; i < n; i++) {
    scanf("%d", &lenght[i]);
    maxx = max(maxx, lenght[i]);
  }
  int res = 0;
  for (int len = l; len <= maxx; len++) {
    int temp = 0;
    for (int i = 0; i < n; i++) temp += lenght[i] / len;
    if (temp * len > res) res = temp * len;
  }
  printf("%d\n", res);
  return 0;
}
