#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, l;
  cin >> n >> l;
  int a[100];
  cin >> a[0];
  int m, d(l);
  m = a[0];
  for (int i(1); i < n; i++) {
    cin >> a[i];
    if (a[i] > m) m = a[i];
  }
  int s(0), s1;
  for (int i(l); i <= m; i++) {
    s1 = 0;
    for (int j(0); j < n; j++) s1 += a[j] / i;
    if (s1 * i > s * d) {
      s = s1;
      d = i;
    };
  }
  cout << s * d;
  cout << "\n";
  cin >> s;
}
