#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e9;
int a[510], n;
long long ans;
bool ok(long long x) {
  long long cnt = 0;
  if (x <= 0) return false;
  for (int i = 0; i < n; i++) {
    if (a[i] / x >= a[i] % x) {
      cnt += a[i] / (x + 1);
      if (a[i] % (x + 1)) cnt++;
    } else
      return false;
  }
  ans = cnt;
  return true;
}
vector<long long> vec;
int main() {
  long long st;
  while (~scanf("%d", &n)) {
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a, a + n);
    st = min(40000, a[0] + 1);
    ans = ok(a[0] + 1);
    vec.clear();
    long long temp;
    for (int i = 1; i < st; i++) {
      if (a[0] / i >= a[0] % i) {
        vec.push_back(i);
      }
      temp = a[0] / i;
      if (temp > 0 && (a[0] / temp >= a[0] % temp)) {
        vec.push_back(temp);
      }
      temp--;
      if (temp > 0 && a[0] / temp >= a[0] % temp) {
        vec.push_back(temp);
      }
    }
    sort(vec.begin(), vec.end());
    vec.resize(unique(vec.begin(), vec.end()) - vec.begin());
    for (int i = vec.size() - 1; i >= 0; i--) {
      if (ok(vec[i])) {
        cout << ans << endl;
        break;
      }
    }
  }
  return 0;
}
