#include <bits/stdc++.h>
using namespace std;
int n, l;
int num[110];
int main() {
  scanf("%d%d", &n, &l);
  int maxx = -1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num[i]);
    maxx = max(maxx, num[i]);
  }
  if (maxx < l) {
    printf("0\n");
    return 0;
  }
  int ans = 0;
  for (int i = l; i <= maxx; i++) {
    int tmp = 0;
    for (int j = 1; j <= n; j++) tmp += (num[j] / i);
    ans = max(ans, tmp * i);
  }
  printf("%d\n", ans);
  return 0;
}
