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