#include <bits/stdc++.h>
using namespace std;
int n, A[510];
long long get(int x) {
  for (int i = 1; i <= n; i++)
    if (A[i] < x) return 1e18;
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    long long low = (A[i] + x) / (x + 1);
    long long high = A[i] / x;
    if (low > high) return 1e18;
    res += low;
  }
  return res;
}
void solve() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", A + i);
  sort(A + 1, A + 1 + n);
  long long ans = 1e18;
  for (int i = 1; i <= A[1] && i <= 40000; i++) {
    int low = (A[1] - 1) / i;
    int high = (A[1]) / i;
    for (int j = max(1, low); j <= high; j++) ans = min(ans, get(j));
  }
  for (int i = 1; i <= 40000; i++) ans = min(ans, get(i));
  printf("%lld\n", ans);
}
int main() {
  int Tc = 1;
  for (int tc = 1; tc <= Tc; tc++) {
    solve();
  }
  return 0;
}
