#include <bits/stdc++.h>
void sort(int *array, size_t size) {
  int i;
  int swapped;
  int tmp;
  do {
    swapped = 0;
    for (i = 0; i < size - 1; i++) {
      if (array[i] > array[i + 1]) {
        tmp = array[i];
        array[i] = array[i + 1];
        array[i + 1] = tmp;
        swapped = 1;
      }
    }
  } while (swapped);
}
int main() {
  int a[101];
  int n, l, s;
  int i, j, max, maxlen = 0;
  scanf("%d %d", &n, &l);
  s = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] > maxlen) maxlen = a[i];
  }
  max = 0;
  for (i = maxlen; i >= l; i--) {
    s = 0;
    for (j = 0; j < n; j++) {
      s += a[j] / i;
    }
    s *= i;
    if (s > max) max = s;
  }
  printf("%d\n", max);
  return 0;
}
