#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, temp;
  cin >> n;
  vector<long long> a(105, 0);
  std::vector<long long> v;
  long long j = 0, k;
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    cin >> temp;
    a[temp] += 1;
    sum += temp;
  }
  v.push_back(sum);
  for (long long i = 1; i < 102; i++) {
    if (a[i] != 0) {
      temp = sum;
      for (j = 1; j <= i / 2; j++) {
        if (i % j == 0) {
          for (k = 1; k < 102; k++) {
            if (i != k and a[k] != 0) {
              v.push_back(temp - k + k * j - i + i / j);
            }
          }
        }
      }
    }
  }
  sort(v.begin(), v.end());
  cout << v[0];
  return 0;
}
