#include <bits/stdc++.h>
int main() {
  int n, l, i, j, sum, result;
  int A[110];
  while (scanf("%d%d", &n, &l) != EOF) {
    result = 0;
    for (i = 0; i < n; i++) scanf("%d", &A[i]);
    for (i = 100; i >= l; i--) {
      sum = 0;
      for (j = 0; j < n; j++) sum += A[j] / i;
      sum = sum * i;
      if (result < sum) result = sum;
    }
    printf("%d\n", result);
  }
  return 0;
}
