#include <bits/stdc++.h>
using namespace std;
const char IO_MODE = 3;
inline long long ReadInt() {
  long long x = 0, s = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') s = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return s * x;
}
inline void WriteInt(long long x) {
  char c[20];
  if (!x) {
    putchar('0');
    return;
  }
  if (x < 0) putchar('-'), x = -x;
  int i = 0;
  while (x > 0) c[++i] = x % 10, x /= 10;
  while (i) putchar(c[i--] + 48);
}
template <typename T>
inline void out(T x) {
  if (IO_MODE & 1)
    WriteInt(x);
  else if (typeid(x) == typeid(int))
    printf("%i", x);
  else
    printf("%lld", (long long)x);
}
template <typename T, typename... Args>
inline void out(T x, Args... args) {
  out(x);
  putc(' ', stdout);
  out(args...);
}
template <typename T>
inline void in(T &x) {
  if (IO_MODE & 2)
    x = ReadInt();
  else if (typeid(x) == typeid(int))
    scanf("%i", &x);
  else if (typeid(x) == typeid(long long))
    scanf("%lld", &x);
}
template <typename T, typename... Args>
inline void in(T &x, Args &...args) {
  in(x);
  in(args...);
}
int tc;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug &operator<<(const c &) {
    return *this;
  }
};
vector<char *> tokenizer(const char *args) {
  char *token = new char[111];
  strcpy(token, args);
  token = strtok(token, ", ");
  vector<char *> v({token});
  while (token = strtok(NULL, ", ")) v.push_back(token);
  return reverse(v.begin(), v.end()), v;
}
void debugg(vector<char *> args) { cerr << "\b\b "; }
template <typename Head, typename... Tail>
void debugg(vector<char *> args, Head H, Tail... T) {
  debug() << " [" << args.back() << ": " << H << "] ";
  args.pop_back();
  debugg(args, T...);
}
long long n, A[100200];
long long check(long long x) {
  if (!x) return 0;
  for (long long i = 0; i < n; i++)
    if (A[i] % x > A[i] / x) return 0;
  return 1;
}
int32_t main() {
  in(n);
  for (long long i = 0; i < n; i++) in(A[i]);
  sort(A, A + n);
  long long x = A[0];
  long long mx = 1;
  for (long long i = 1; i * i <= x; i++) {
    long long m = x / i;
    if (x % i == 0) {
      if (check(i - 1)) mx = max(mx, i - 1);
      if (check(m - 1)) mx = max(mx, m - 1);
      if (check(i)) mx = max(mx, i);
      if (check(m)) mx = max(mx, m);
    } else {
      if (check(i)) mx = max(mx, i);
      if (check(m)) mx = max(mx, m);
    }
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) ans += (A[i] + mx) / (mx + 1);
  cout << ans << endl;
}
