#include <bits/stdc++.h>
using namespace std;
const int N = 50000;
int v[N];
int main() {
  int n;
  cin >> n;
  int s = 0, mn = 101;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    s += v[i];
    mn = min(mn, v[i]);
  }
  int rez = s;
  for (int i = 0; i < n; i++) {
    for (int j = 1; j <= v[i]; j++) {
      if (v[i] % j == 0) {
        int tmp = s - v[i] - mn + v[i] / j + mn * j;
        rez = min(rez, tmp);
      }
    }
  }
  cout << rez;
}
