#include <bits/stdc++.h>
using namespace std;
const int INFint = 2e9;
const long long INF = 2e18;
const long long MOD = 1000000007ll;
int main() {
  ios_base::sync_with_stdio(0);
  int n, l;
  cin >> n >> l;
  vector<int> v(n);
  for (auto &x : v) cin >> x;
  int ans = 0;
  for (int d = l; d <= 100; d++) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (v[i] < d) continue;
      int x = v[i];
      while (x >= d) {
        x -= d;
        cnt++;
      }
    }
    ans = max(ans, cnt * d);
  }
  cout << ans;
  fprintf(stderr, "\nTIME = %lf\n", 1.0 * clock() / CLOCKS_PER_SEC);
  ;
  return 0;
}
