#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int INF = 0x3f3f3f3f * 2;
int a[505];
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] + 1; k++) {
    s = work(a[0] / k + 1);
    if (s) break;
    s = work(a[0] / k);
    if (s) break;
  }
  printf("%I64d\n", s);
  return 0;
}
