#include <bits/stdc++.h>
using namespace std;
long long const MX = 1e5 + 10;
long long const INF = 1e9;
int DX[4] = {1, 0, 0, -1};
int DY[4] = {0, -1, 1, 0};
char dc[4] = {'D', 'L', 'R', 'U'};
int a[MX];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, l;
  cin >> n >> l;
  int mxnum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mxnum = max(a[i], mxnum);
  }
  int mx = 0;
  for (int i = l; i <= mxnum; i++) {
    int tmp = 0;
    for (int j = 0; j < n; j++) {
      tmp += (a[j] / i);
    }
    mx = max(tmp * i, mx);
  }
  cout << mx;
  return 0;
}
