#include <bits/stdc++.h>
using namespace std;
long long a[505];
int main() {
  long long n, i, j;
  scanf("%lld", &n);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + 1 + n);
  long long ans = 100000000000000000LL;
  for (i = 1; i * i <= a[1]; i++) {
    long long flag = 1, d = a[1] / i + 1, dt = 0;
    for (j = 1; j <= n; j++) {
      if (a[j] % d == 0) {
        dt += a[j] / d;
      } else {
        dt += a[j] / d;
        dt++;
        if ((a[j] / d + 1) * d - a[j] - 1 > a[j] / d) {
          flag = 0;
          break;
        }
      }
    }
    if (flag) ans = min(ans, dt);
    flag = 1;
    if (a[1] % i == 0) {
      d = a[1] / i;
      dt = 0;
      for (j = 1; j <= n; j++) {
        if (a[j] % d == 0) {
          dt += a[j] / d;
        } else {
          dt += a[j] / d;
          dt++;
          if ((a[j] / d + 1) * d - a[j] - 1 > a[j] / d) {
            flag = 0;
            break;
          }
        }
      }
      if (flag) ans = min(ans, dt);
    }
  }
  cout << ans << endl;
  return 0;
}
