#include <bits/stdc++.h>
using namespace std;
const int maxn = 510;
int a[maxn];
int n;
long long ans;
int judge(int x) {
  ans = 0;
  int i, t, d;
  for (i = 1; i <= n; i++) {
    t = a[i] / x;
    d = a[i] % x;
    if (d == 0)
      ans += t;
    else if (d + t >= x - 1)
      ans += t + 1;
    else
      return 0;
  }
  return 1;
}
int main() {
  int mina = 1000000010;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < mina) mina = a[i];
  }
  for (int i = 1; i <= mina; i++) {
    if (judge(mina / i + 1))
      break;
    else if (judge(mina / i))
      break;
  }
  printf("%I64d\n", ans);
  return 0;
}
