#include <bits/stdc++.h>
using namespace std;
int n;
int aa[8000];
long long ans;
int f(int x) {
  ans = 0;
  for (int i = 0; i < n; i++) {
    if (aa[i] % x == 0)
      ans += aa[i] / x;
    else if (aa[i] % x + aa[i] / x >= x - 1)
      ans += aa[i] / x + 1;
    else
      return 0;
  }
  return 1;
}
int main() {
  while (cin >> n) {
    int minn = 1100000010;
    for (int i = 0; i < n; i++) {
      scanf("%d", &aa[i]);
      minn = min(minn, aa[i]);
    }
    for (int i = 1; i <= minn; i++) {
      if (f(minn / i + 1)) {
        cout << ans << endl;
        break;
      } else if (f(minn / i)) {
        cout << ans << endl;
        break;
      }
    }
  }
}
