#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#pragma GCC target("avx,tune=native")
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-6;
const int mod = 1000000007;
inline string getstr(string &s, int l, int r) {
  string ret = "";
  for (int i = l; i <= r; i++) ret.push_back(s[i]);
  return ret;
}
int modpow(int x, int y, int md = mod) {
  if (y == 0) return 1;
  int ret = modpow(x, y >> 1, md);
  ret = (long long)ret * ret % md;
  if (y & 1) ret = (long long)ret * x % md;
  return ret;
}
int n;
int a[505];
const int magic = 32000;
signed main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long ans = 1e18;
  for (int base = 1; base <= magic; base++) {
    bool can = true;
    long long cnt = 0;
    for (int j = 1; j <= n; j++) {
      int div = a[j] / base, rem = a[j] % base;
      if (rem > div) {
        can = false;
        break;
      }
      cnt += (a[j] + base) / (base + 1);
    }
    if (can) ans = min(ans, cnt);
  }
  for (int sz = 1; sz <= magic; sz++) {
    int base = a[1] / sz;
    if (!base) continue;
    bool can = true;
    long long cnt = 0;
    for (int j = 1; j <= n; j++) {
      int div = a[j] / base, rem = a[j] % base;
      if (rem > div) {
        can = false;
        break;
      }
      cnt += (a[j] + base) / (base + 1);
    }
    if (can) ans = min(ans, cnt);
    base = a[1] / sz - 1;
    if (base <= 0) continue;
    can = true;
    cnt = 0;
    for (int j = 1; j <= n; j++) {
      int div = a[j] / base, rem = a[j] % base;
      if (rem > div) {
        can = false;
        break;
      }
      cnt += (a[j] + base) / (base + 1);
    }
    if (can) ans = min(ans, cnt);
  }
  cout << ans << endl;
  return 0;
}
