#include <bits/stdc++.h>
using namespace std;
int vis[105];
int main() {
  int n, tot = 0, val;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> val;
    vis[val] = 1;
    tot += val;
  }
  int maxn = -1;
  for (int i = 1; i <= 100; i++) {
    if (!vis[i]) continue;
    for (int j = i; j <= 100; j++) {
      if (!vis[j]) continue;
      int minn = i + j;
      for (int x = 2; x < 100; x++) {
        if (j % x == 0 && i * x + j / x < minn) {
          minn = i * x + j / x;
        }
      }
      maxn = max(maxn, i + j - minn);
    }
  }
  cout << tot - maxn << endl;
  return 0;
}
