#include <bits/stdc++.h>
using namespace std;
const int maxn = 509;
int a[maxn];
int main() {
  int n;
  scanf("%d", &n);
  int mi = 2e9;
  for (int i = 1; i <= n; i++) scanf("%d", a + i), mi = min(mi, a[i]);
  int ans = -1;
  for (int i = 1; i <= floor(sqrt(mi)) + 1; i++) {
    if (i == 2) {
      i = 2;
    }
    int siz = mi / i, res = mi % i;
    int can = 1;
    for (int j = 1; j <= n; j++) {
      int r = a[j] / siz, p = a[j] % siz;
      if (res) {
        if (p > r) {
          can = 0;
          break;
        }
      } else {
        if (p > r) {
          siz--;
          res = 1;
          r = a[j] / siz, p = a[j] % siz;
        }
        if (p > r) {
          can = 0;
          break;
        }
      }
    }
    if (can) {
      ans = siz;
      break;
    }
  }
  long long ct = 0;
  for (int i = 1; i <= n; i++) {
    ct += (long long)(a[i] + ans) / (long long)(ans + 1);
  }
  printf("%lld\n", ct);
}
