#include <bits/stdc++.h>
using namespace std;
int a[120], x;
int main() {
  int i, j, k, n, sum = 0, f = 0, r;
  scanf("%d%d", &n, &x);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (;; x++) {
    sum = 0;
    for (i = 0; i < n; i++) {
      sum += a[i] / x;
    }
    f = max(f, sum * x);
    if (sum * x == 0) break;
  }
  printf("%d\n", f);
  return 0;
}
