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