#include <bits/stdc++.h>
using namespace std;
int a[200], n, l, cur, ans = 0;
int main() {
  scanf("%d%d", &n, &l);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  cur = 0;
  while (cur < n) {
    while (cur < n && a[cur] < l) cur++;
    int tans = 0;
    for (int i = cur; i < n; i++) tans += a[i] / l;
    ans = max(ans, l * tans);
    l++;
  }
  printf("%d\n", ans);
  return 0;
}
