#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int sum = 0;
  char c = getchar();
  bool f = 0;
  while (c < '0' || c > '9') {
    if (c == '-') f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    sum = sum * 10 + c - '0';
    c = getchar();
  }
  if (f) return -sum;
  return sum;
}
const int N = 505;
const int S = 33000;
const int orz = 2000000000;
int n, cnt, a[N], K[S * 3 + 10];
int main() {
  int i, j, k, mn = orz;
  long long ans = 0;
  n = read();
  for (i = 1; i <= n; i++) a[i] = read(), mn = min(mn, a[i]);
  for (i = 1; i <= S; i++)
    if (mn / i >= mn % i) K[++cnt] = i;
  for (i = 1; i <= S; i++) {
    k = mn / i;
    if (!k) break;
    if (mn / k >= mn % k) K[++cnt] = k;
    k--;
    if (!k) break;
    if (mn / k >= mn % k) K[++cnt] = k;
  }
  sort(K + 1, K + cnt + 1);
  for (i = cnt; i >= 1; i--) {
    if (K[i] == K[i + 1])
      continue;
    else
      k = K[i];
    for (j = 1; j <= n; j++)
      if (a[j] / k < a[j] % k) goto over;
    for (j = 1; j <= n; j++) ans += (a[j] / (k + 1)) + (a[j] % (k + 1) != 0);
    printf("%I64d\n", ans);
    return 0;
  over:;
  }
  return 0;
}
