#include <bits/stdc++.h>
using namespace std;
int n;
long long a[505];
long long check(int x) {
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    int q = a[i] / x;
    int p = a[i] % x;
    if (p == 0 || q + p >= x - 1) {
      sum += q;
      if (p != 0) sum++;
    } else
      return 0;
  }
  return sum;
}
int main() {
  while (cin >> n) {
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    long long ans;
    for (int i = 1; i <= a[0]; i++) {
      ans = check(a[0] / i + 1);
      if (ans != 0) break;
      ans = check(a[0] / i);
      if (ans != 0) break;
      ans = check(a[0] / i - 1);
      if (ans != 0) break;
    }
    cout << ans << endl;
  }
  return 0;
}
