#include <bits/stdc++.h>
using namespace std;
const char NL = '\n';
const char SP = ' ';
int main() {
  ios_base::sync_with_stdio(false);
  long long n, c = 0;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long minm = a[0], cmin = int(1e9) + 1;
  for (long long i = 1; i < n; i++) {
    if (a[i] >= minm) {
      minm = a[i];
    } else {
      c += minm - a[i];
      cmin = min(minm - a[i], cmin);
    }
  }
  cout << c / cmin << NL;
  return 0;
}
