#include <bits/stdc++.h>
long n, l;
long d[105] = {0};
int main() {
  long i, j, k, ans = 0, max = 0, sum = 0;
  scanf("%ld%ld", &n, &l);
  for (i = 1; i <= n; i++) {
    scanf("%ld", &d[i]);
    if (d[i] > max) max = d[i];
  }
  for (i = l; i <= max; i++) {
    sum = 0;
    for (j = 1; j <= n; j++) sum += (d[j] / i);
    if (sum * i > ans) ans = sum * i;
  }
  printf("%ld\n", ans);
  return (0);
}
