#include <bits/stdc++.h>
using namespace std;
int a[110];
int main() {
  int res = 0;
  int n, l;
  scanf("%d%d", &n, &l);
  for (int i = (0); i < (n); ++i) scanf("%d", &a[i]);
  for (int i = (l); i < (101); ++i) {
    int cnt = 0;
    for (int j = (0); j < (n); ++j) cnt += a[j] / i;
    res = ((res < cnt * i) ? (cnt * i) : (res));
  }
  cout << res << endl;
}
