#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, l;
  cin >> n >> l;
  vector<int> arr;
  int alt = INT_MAX;
  int mv = INT_MIN;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    arr.push_back(a);
    if (a >= l && a < alt) alt = a;
    mv = max(mv, a);
  }
  if (alt == INT_MAX) {
    cout << "0";
    return 0;
  }
  sort(arr.begin(), arr.end());
  int mw = INT_MAX, mwv = -1;
  for (int i = l; i <= mv; i++) {
    int was = 0;
    for (int j = 0; j < n; j++) was += (arr[j] % i);
    if (was < mw) {
      mw = was;
      mwv = i;
    }
  }
  int ans = 0;
  for (int i = 0; i < n; i++) ans += (arr[i] / mwv);
  cout << (ans * mwv);
  return 0;
}
