#include <bits/stdc++.h>
using namespace std;
void solve(int test_case) {}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k;
  cin >> n >> k;
  int arr[n];
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  int ans = 0;
  for (int i = k; i < 101; ++i) {
    int curr = 0;
    for (int j = 0; j < n; ++j) {
      curr += arr[j] / i;
    }
    curr *= i;
    ans = max(ans, curr);
  }
  cout << ans << "\n";
  return 0;
}
