#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int IINF = 1000000000;
const double PI = acos(-1.0);
const long long LINF = 6000000000000000000LL;
bool check(int k, int l, const vector<int>& v) {
  int cnt = 0;
  for (int i = 0; i < v.size(); ++i) {
    cnt += v[i] / l;
  }
  return cnt >= k;
}
int main() {
  int n, l;
  while (scanf("%d%d", &n, &l) == 2) {
    vector<int> v(n);
    for (int i = 0; i < n; ++i) {
      scanf("%d", &v[i]);
    }
    int ans = 0;
    for (int s = 1; s <= 10000; ++s) {
      for (int d = 1; d * d <= s; ++d) {
        if (s % d == 0) {
          int d1 = d, d2 = s / d;
          if (d1 >= l && check(d2, d1, v)) {
            ans = max(ans, s);
          }
          if (d2 >= l && check(d1, d2, v)) {
            ans = max(ans, s);
          }
        }
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
