#include <bits/stdc++.h>
using namespace std;
int n, a[505];
long long ans = (long long)1e16, cnt;
bool check(int x) {
  if (x <= 0) return false;
  cnt = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] % x <= a[i] / x)
      cnt += 1ll * (a[i] + x) / (x + 1);
    else
      return false;
  return true;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int sq = sqrt(a[1] + 1);
  for (int i = 1; i <= sq; i++) {
    int x = a[1] / i;
    if (check(x)) ans = min(ans, cnt);
    if (a[1] % x == 0 && check(x - 1)) ans = min(ans, cnt);
    if (ans < (long long)1e16) {
      printf("%lld\n", ans);
      return 0;
    }
  }
  for (int i = sq + 1; i; i--) {
    if (check(i)) ans = min(ans, cnt);
    if (ans < (long long)1e16) {
      printf("%lld\n", ans);
      return 0;
    }
  }
}
