#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const int MX = 555;
const int P = 1e9 + 7;
int w[MX], n;
bool check(int x) {
  for (int i = 2; i <= n; i++) {
    if (w[i] % x) {
      if (w[i] - x * (w[i] / x) + w[i] / x >= x - 1) {
      } else
        return 0;
    }
  }
  return 1;
}
int main() {
  while (cin >> n) {
    for (int i = 1; i <= n; i++) scanf("%d", &w[i]);
    sort(w + 1, w + 1 + n);
    int t = sqrt(w[1] + 0.5);
    if (t * t != w[1]) t++;
    int i = 1;
    int ans = 0;
    for (int i = 1; i <= t; i++) {
      if (w[1] % i) {
        if (check(w[1] / i + 1)) {
          ans = w[1] / i + 1;
          break;
        }
      } else {
        if (check(w[1] / i + 1)) {
          ans = w[1] / i + 1;
          break;
        }
        if (check(w[1] / i)) {
          ans = w[1] / i;
          break;
        }
      }
    }
    long long tt = 0;
    for (int i = 1; i <= n; i++) {
      tt += w[i] / ans;
      if (w[i] % ans) tt++;
    }
    cout << tt << endl;
  }
  return 0;
}
