#include <bits/stdc++.h>
inline int max(int a, int b) { return a > b ? a : b; }
int num[102];
int main() {
  int n, L;
  while (scanf("%d %d", &n, &L) != EOF) {
    for (int i = 0; i < n; i++) {
      scanf("%d", &num[i]);
    }
    int ans = 0;
    do {
      int tmp = 0;
      for (int i = 0; i < n; i++) {
        tmp += num[i] / L;
      }
      ans = max(ans, tmp * L);
      L++;
    } while (L < 102);
    printf("%d\n", ans);
  }
  return 0;
}
