#include <bits/stdc++.h>
using namespace std;
int d[110];
int main() {
  int n, l;
  while (cin >> n >> l) {
    int i, j;
    int c = 0;
    int temp;
    int max = -1;
    for (i = 1; i <= n; i++) {
      cin >> temp;
      if (temp >= l) {
        d[c++] = temp;
        if (temp > max) {
          max = temp;
        }
      }
    }
    if (c == 0) {
      cout << 0 << endl;
      continue;
    }
    int ans = -100;
    temp = 0;
    for (i = l; i <= max; i++) {
      temp = 0;
      for (j = 0; j < c; j++) {
        temp += i * (d[j] / i);
      }
      if (temp > ans) {
        ans = temp;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
