#include <bits/stdc++.h>
using namespace std;
int n;
long long a[600];
vector<int> vv;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a, a + n);
  for (int i = 1; i < 40000; ++i) {
    if (a[0] / i >= a[0] % i) vv.push_back(i);
  }
  for (int i = 1; i < 40000; ++i) {
    long long k = a[0] / i;
    if (k > 0 && (a[0] / k >= a[0] % k)) vv.push_back(k);
    k -= 1;
    if (k > 0 && (a[0] / k >= a[0] % k)) vv.push_back(k);
  }
  sort(vv.begin(), vv.end());
  vv.resize(unique(vv.begin(), vv.end()) - vv.begin());
  for (int i = vv.size() - 1; i >= 0; --i) {
    int x = vv[i];
    int fl = 0;
    for (int j = 0; j < n; ++j) {
      if (a[j] / x < a[j] % x) {
        fl = 1;
        break;
      }
    }
    if (!fl) {
      long long ans = 0;
      for (int j = 0; j < n; ++j) {
        ans += a[j] / (x + 1);
        if (a[j] % (x + 1)) ++ans;
      }
      cout << ans << "\n";
      return 0;
    }
  }
  return 0;
}
