#include <bits/stdc++.h>
int d[100];
int main() {
  int n, l, i, j, m = 0, t;
  scanf("%d %d", &n, &l);
  for (i = 0; i < n; i++) scanf("%d", &d[i]);
  for (i = l; i <= 100; i++) {
    t = 0;
    for (j = 0; j < n; j++) t += d[j] / i;
    if (t * i > m) m = t * i;
  }
  printf("%d\n", m);
  return 0;
}
