#include <bits/stdc++.h>
using namespace std;
int n;
int a[505];
vector<int> kompatibilni(int n) {
  vector<int> z;
  int i = 1;
  for (i = 1; i * i <= n; i++) {
    z.push_back(i);
  }
  i--;
  for (int j = i; j > 0; j--) {
    if (n % j == 0) {
      int x = n / j;
      if (x > 1) {
        z.push_back(x - 1);
      }
      z.push_back(x);
    } else {
      z.push_back(n / j);
    }
  }
  sort(z.begin(), z.end());
  z.resize(unique(z.begin(), z.end()) - z.begin());
  return z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cerr.tie(nullptr);
  cin >> n;
  vector<int> dobri;
  bool init = false;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    vector<int> t = kompatibilni(a[i]);
    if (!init) {
      dobri = t;
      init = true;
    } else {
      vector<int> t2;
      set_intersection(t.begin(), t.end(), dobri.begin(), dobri.end(),
                       back_inserter(t2));
      dobri = t2;
    }
  }
  int x = *dobri.rbegin();
  long long sol = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] % (x + 1) == 0) {
      sol += a[i] / (x + 1);
    } else {
      int u = (x + 1) - a[i] % (x + 1);
      int v = (a[i] - u * x) / (x + 1);
      sol += u + v;
    }
  }
  cerr << "x: " << x << '\n';
  cout << sol;
}
