#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
const int N = 5e2 + 10;
int n;
long long arr[N];
long long lim = 0;
long long ans = INF;
long long check(long long siz) {
  long long tans = 0;
  for (int i = 1; i <= n; ++i) {
    if (arr[i] % (siz + 1) == 0)
      tans += arr[i] / (siz + 1);
    else if ((arr[i] / siz) >= (arr[i] % siz))
      tans += arr[i] / (siz + 1) + 1;
    else {
      tans = INF;
      break;
    }
  }
  return tans;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    lim = max(lim, (long long)sqrt(arr[i]));
  }
  for (int i = 1; i <= lim; ++i) ans = min(ans, check(i));
  for (int i = 1; i <= lim; ++i) {
    long long siz = arr[1] / i;
    ans = min(ans, check(siz));
    if (arr[1] % i == 0 and siz > 1) ans = min(ans, check(siz - 1));
  }
  cout << ans << endl;
  return 0;
}
