#include <bits/stdc++.h>
using namespace std;
template <class T>
bool mins(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool maxs(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
const int N = 501;
const int M = 1e5 + 1;
int a[N];
int cnt2[M] = {};
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  unordered_map<int, int> cnt;
  for (int i = 0; i < n; i++) {
    cnt[a[i] + 1]++;
    int sqr = sqrt(a[i] + 0.25) - 0.5;
    for (int j = 1; j <= sqr; j++) {
      int val = (a[i] + j - 1) / j;
      if (j > 1 && a[i] % j == 0) {
        cnt[val + 1]++;
      }
      if (val > 1) cnt[val]++;
    }
    sqr = ceil(a[i] / ceil(sqrt(a[i])));
    for (int j = 2; j <= sqr; j++) {
      cnt2[j]++;
    }
  }
  int s = 2;
  for (auto it = cnt.begin(); it != cnt.end(); it++) {
    if (it->first < 100000) {
      if (cnt2[it->first] + it->second == n) {
        s = max(s, it->first);
        continue;
      }
    }
    if (it->second == n) {
      s = max(s, it->first);
    }
  }
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    ans += (a[i] + s - 1ll) / s;
  }
  printf("%lld", ans);
  return 0;
}
