#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
vector<int> v;
int main() {
  ios::sync_with_stdio(false);
  int n, l, temp;
  while (cin >> n >> l) {
    v.clear();
    for (int i = 0; i < (n); i++) {
      cin >> temp;
      if (temp >= l) v.push_back(temp);
    }
    int ans = 0;
    for (int i = l; i < (101); i++) {
      temp = 0;
      for (int j = 0; j < (v.size()); j++) {
        temp += v[j] / i;
      }
      ans = max(ans, temp * i);
    }
    cout << ans << "\n";
  }
}
