#include <bits/stdc++.h>
const int N = 509;
int n, a[N], res = -1;
bool ok(int _, int b, int t) {
  for (int i = 1; i <= n; ++i) {
    int x = a[i] / _, y = a[i] % _;
    if (b && y > x) return 0;
    if (!b) {
      if (y > x) {
        --_;
        b = 1;
        x = a[i] / _;
        y = a[i] % _;
      }
      if (y > x) return 0;
    }
  }
  res = _;
  return 1;
}
int main() {
  std::cin >> n;
  for (int i = 1; i <= n; ++i) std::cin >> a[i];
  std::sort(a + 1, a + 1 + n);
  for (int i = 1; i <= (int)(sqrt(a[1])) + 1; ++i) {
    int s = a[1] / i, mo = a[1] % i;
    if (ok(s, mo, i)) break;
  }
  long long ans = 0;
  for (int i = 1; i <= n; ++i) {
    ans = ans + 1ll * (a[i] + res) / (res + 1);
  }
  std::cout << ans << '\n';
  return 0;
}
