#include <bits/stdc++.h>
using namespace std;
long long ans;
int a[505], n;
void solve(int x) {
  long long tot = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i] / x < a[i] % x) return;
    tot += (a[i] + x) / (x + 1);
  }
  ans = min(ans, tot);
  return;
}
int main() {
  scanf("%d", &n);
  ans = 1e18;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + n + 1);
  int x = sqrt(a[1]);
  solve(x);
  for (int i = 1; i <= x; ++i) {
    int y = a[1] / i;
    if (i * y == a[1] && y > 1) {
      solve(y - 1);
    }
    solve(y);
  }
  printf("%lld\n", ans);
}
