#include <bits/stdc++.h>
using namespace std;
int a[101];
int main() {
  int n, l;
  cin >> n >> l;
  int m = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    m = max(m, a[i]);
  }
  int maxn = 0;
  while (l <= m) {
    int sum = 0;
    for (int i = 0; i < n; i++) sum += a[i] / l;
    maxn = max(maxn, sum * l);
    l++;
  }
  cout << maxn;
  return 0;
}
