#include <bits/stdc++.h>
using namespace std;
int a[555];
vector<int> b;
int main() {
  int N;
  scanf("%d", &N);
  int id = 0;
  for (int i = 0; i < N; i++) {
    scanf("%d", a + i);
    int j;
    for (j = 1; j * j <= a[i]; j++) {
      b.push_back(a[i] / j);
      if (a[i] % j == 0) b.push_back(a[i] / j - 1);
    }
    for (; --j;) {
      if (a[i] / j * (j + 1) >= a[i]) b.push_back(j);
    }
  }
  long long ans = 0;
  for (int j = 0; j < b.size(); j++) {
    int c = b[j], i;
    if (c)
      for (i = 1; i < N; i++) {
        if (a[i] / c * (c + 1) < a[i]) break;
      }
    if (i == N) {
      for (int i = 0; i < N; i++) ans += a[i] / (c + 1) + (a[i] % (c + 1) > 0);
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
