#include <bits/stdc++.h>
using namespace std;
int n, val[505], mine = 0x3f3f3f3f;
long long ans;
void check(int x) {
  ans = 0;
  for (int i = 1; i <= n; i++) {
    if ((val[i] % x + val[i] / x < (x - 1)) && val[i] % x) return;
    ans += (long long)val[i] / x + ((val[i] % x) != 0);
  }
  printf("%I64d\n", ans);
  exit(0);
  return;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &val[i]);
    mine = min(mine, val[i]);
  }
  for (int i = 1; i <= mine; i++) {
    check(mine / i + 1);
    check(mine / i);
    check(mine / i - 1);
  }
  return 0;
}
