#include <bits/stdc++.h>
using namespace std;
int N, M;
int A[120];
int ans, now;
int main() {
  cin >> N >> M;
  for (int i = 1; i <= N; i++) cin >> A[i];
  ans = 0;
  for (int i = M; i <= 100; i++) {
    now = 0;
    for (int j = 1; j <= N; j++) now += int(A[j] / i);
    if (now * i > ans) ans = now * i;
  }
  cout << ans << "\n";
  return 0;
}
