#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7f3f3f3f;
const long long INFF = 0x3f3f3f3f3f3f3f3fll;
const long long M = 1e9 + 7;
const long long maxn = 600 + 7;
const double eps = 1e-7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
template <typename T>
inline T abs(T a, T b) {
  return a > 0 ? a : -a;
}
int n, m, mm;
int i, k, t;
long long ans;
int a[maxn];
inline long long lowbit(long long x) { return x & (-x); }
bool solve(int t) {
  int i;
  if (t == 0) return 0;
  if (t == 1) return 1;
  for (i = 0; i < n; i++)
    if (a[i] != t + 1 && a[i] % t > a[i] / t) return 0;
  return 1;
}
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  t = a[0];
  k = 1;
  while (!solve(t + 1) && !solve(t) && !solve(t - 1)) {
    k++;
    t = a[0] / k;
  }
  t++;
  while (!solve(t)) t--;
  while (solve(t + 1)) t++;
  for (i = 0; i < n; i++) ans += a[i] / (t + 1) + (a[i] % (t + 1) != 0);
  printf("%I64d", ans);
}
