#include <bits/stdc++.h>
using namespace std;
long long num[505];
int n;
long long minval = 0x3f3f3f3f3f3f3f3fll;
long long check(int x) {
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (num[i] % x == 0) {
      ans += num[i] / x;
    } else {
      if (num[i] % x + num[i] / x >= x - 1) {
        ans += num[i] / x + 1;
      } else {
        return 0;
      }
    }
  }
  return ans;
}
void solve(int x) {
  long long t = check(x);
  if (t) {
    printf("%I64d\n", t);
    exit(0);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &num[i]);
    minval = min(minval, num[i]);
  }
  long long t = (long long)sqrt(minval);
  for (long long i = 1; i <= t; i++) {
    solve(minval / i + 1);
    solve(minval / i);
    solve(minval / i - 1);
  }
  for (long long i = 2; i * t <= minval; i++) {
    solve(minval / (i * t) + 1);
    solve(minval / (i * t));
    solve(minval / (i * t) - 1);
  }
  return 0;
}
