#include <bits/stdc++.h>
int n, l, a[105];
int main(void) {
  scanf("%d %d", &n, &l);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  int ans = 0, num;
  for (int i = l; i <= 100; ++i) {
    num = 0;
    for (int j = 1; j <= n; ++j) num += a[j] / i;
    ans = i * num > ans ? i * num : ans;
  }
  printf("%d\n", ans);
  return 0;
}
