#include <bits/stdc++.h>
using namespace std;
const int N = 505;
template <typename T>
inline void read(T &AKNOI) {
  T x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  AKNOI = flag * x;
}
int n, a[N];
long long ans;
bool wow(int x) {
  ans = 0;
  for (int i = 1; i <= n; ++i) {
    int y = a[i] / x, z = a[i] % x;
    if (!z) {
      ans += y;
    } else {
      if (y + z < x - 1) return 0;
      ans += y + 1;
    }
  }
  return 1;
}
void init() {
  read(n);
  for (int i = 1; i <= n; ++i) {
    read(a[i]);
  }
  sort(a + 1, a + n + 1);
}
void solve() {
  for (int i = 1; i <= a[1]; ++i) {
    if (wow(a[1] / i + 1) || wow(a[1] / i)) {
      break;
    }
  }
  printf("%lld\n", ans);
}
int main() {
  init();
  solve();
  return 0;
}
