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