#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000];
vector<int> q, w;
long long ans;
signed main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int Min = *min_element(a + 1, a + n + 1);
  for (int i = 1; i * i <= Min; ++i) {
    q.push_back(i);
    bool f = bool(Min % i);
    q.push_back(Min / i - !f);
    if (!f) q.push_back(Min / i);
  }
  for (int i = 0; i < (int)q.size(); ++i) {
    int cur = q[i];
    if (cur) {
      bool flag = true;
      for (int j = 1; j <= n; ++j) {
        int d1 = a[j] / cur;
        int d2 = a[j] % cur;
        if (d1 < d2) {
          flag = false;
          break;
        }
      }
      if (flag) w.push_back(cur);
    }
  }
  int Max = *max_element(w.begin(), w.end());
  for (int i = 1; i <= n; ++i) {
    ans += a[i] / Max;
    ans -= (a[i] / Max - a[i] % Max) / (Max + 1);
  }
  cout << ans;
  return 0;
}
