#include <bits/stdc++.h>
using namespace std;
int a[1000];
int n;
long long work(int x) {
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] % x == 0 || (a[i] / x + a[i] % x >= x - 1))
      sum += a[i] / x + (a[i] % x != 0);
    else
      return 0;
  }
  return sum;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  long long s;
  for (int k = 1; k <= a[0]; k++) {
    s = work(a[0] / k + 1);
    if (s) break;
    s = work(a[0] / k);
    if (s) break;
    s = work(a[0] / k - 1);
    if (s) break;
  }
  printf("%lld\n", s);
}
