#include <bits/stdc++.h>
int a[105];
int n;
int l;
int square(int len) {
  int square = 0;
  for (int i = 0; i < n; i++) {
    square += a[i] / len;
  }
  return square * len;
}
int main() {
  scanf("%i %i", &n, &l);
  for (int i = 0; i < n; i++) scanf("%i", &a[i]);
  int sq = 0;
  for (int i = l; i < 100; i++) {
    int sq2 = square(i);
    sq = ((sq) > (sq2) ? (sq) : (sq2));
  }
  printf("%i", sq);
  return 0;
}
