#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, mn(200), sum(0);
  cin >> n;
  vector<int> arr(n);
  for (auto &value : arr) {
    cin >> value;
    sum += value;
    mn = min(value, mn);
  }
  int res = sum;
  for (auto &value : arr) {
    for (int i = 1; i <= value; i++) {
      if (value % i != 0) continue;
      int cur = sum - mn - value;
      cur += (mn * i) + (value / i);
      res = min(res, cur);
    }
  }
  cout << res << endl;
  return 0;
}
