#include <bits/stdc++.h>
using namespace std;
int compare(const void *elem1, const void *elem2) {
  return *((int *)(elem1)) - *((int *)(elem2));
}
int main() {
  int n, l, i, j;
  int a[100];
  int b[100];
  int c[101];
  int temp;
  while (cin >> n >> l) {
    for (i = 0; i < n; i++) cin >> a[i];
    qsort(a, n, sizeof(int), compare);
    if (a[n - 1] < l)
      cout << 0 << endl;
    else {
      for (i = 0; i < n; i++)
        if (a[i] >= l) {
          temp = i;
          break;
        }
      int sum = 0;
      for (i = temp; i < n; i++) {
        for (j = i; j < n; j++) b[j] = a[j] / a[i];
        for (j = i; j < n; j++) sum = sum + b[j];
        c[i] = sum * a[i];
        sum = 0;
      }
      for (j = temp; j < n; j++) b[j] = a[j] / l;
      for (j = temp; j < n; j++) sum = sum + b[j];
      c[n] = sum * l;
      for (i = temp; i < n + 1; i++) c[i - temp] = c[i];
      qsort(c, n - temp + 1, sizeof(int), compare);
      cout << c[n - temp] << endl;
    }
  }
  return 0;
}
