#include <bits/stdc++.h>
int main() {
  int n, i, j = 1, k, f, min, mnum, snum, check, chkmax = 1, chg = 0;
  long long sum = 0;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  min = a[0];
  for (i = 1; i < n; i++) {
    if (a[i] < min) {
      min = a[i];
    }
  }
  while (min / j >= 1) {
    chg = 0, sum = 0;
    if (chkmax == 1) {
      snum = min / j, mnum = snum + 1, chkmax = 0;
    } else
      chkmax = 1, j++;
    for (i = 0; i < n; i++) {
      k = a[i] % mnum;
      f = a[i] / mnum;
      if (k == 0) {
        sum += f;
      } else if (a[i] == snum) {
        sum++;
      } else if (snum - k <= f) {
        sum += f + 1;
      } else if (snum - k > f) {
        chg = 1;
        break;
      }
    }
    if (chg == 1 && chkmax == 0) {
      mnum = snum, snum = mnum - 1;
    } else if (i == n) {
      break;
    }
  }
  printf("%lld", sum);
  return 0;
}
