#include <bits/stdc++.h>
using namespace std;
const int MX = 1e6 + 10;
int n;
long long ans;
int a[505];
bool check(long long x, long long &cnt) {
  if (x <= 0) return false;
  cnt = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] % x <= a[i] / x)
      cnt += ceil(a[i] * 1.0 / (x + 1));
    else
      return false;
  }
  return true;
}
int main() {
  while (cin >> n) {
    ans = (long long)1 << 60;
    for (int i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    long long cnt = 0;
    int nw = (int)sqrt(a[0]) + 1;
    for (int i = 1; i <= nw; i++) {
      int k = a[0] / i;
      if (check(k, cnt)) ans = min(cnt, ans);
      if (a[0] % i == 0)
        if (check(k - 1, cnt)) ans = min(cnt, ans);
      if (ans != (long long)1 << 60) break;
    }
    for (int i = nw + 1; i >= 1; i--) {
      if (check(i, cnt)) ans = min(ans, cnt);
      if (ans != (long long)1 << 60) break;
    }
    cout << ans << endl;
  }
  return 0;
}
