#include <bits/stdc++.h>
using namespace std;
const long long int mod = 998244353;
const long long int INF = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  long long int i, j, k, a, b, flag = 0, m, n, q, sum, x, y, temp = 1, l, r, g,
                               ans = LLONG_MAX, idx = 0;
  cin >> n;
  vector<pair<long long int, long long int> > arr;
  long long int front[n], back[n];
  for (i = 0; i < n; i++) {
    cin >> a;
    arr.push_back(make_pair(a, i + 1));
  }
  sort(arr.begin(), arr.end());
  front[n - 2] = back[n - 2] = arr[n - 1].second;
  for (i = n - 3; i >= 0; i--) {
    front[i] = min(front[i + 1], arr[i + 1].second);
    back[i] = max(back[i + 1], arr[i + 1].second);
  }
  for (i = 0; i < n - 1; i++) {
    idx = max(abs(arr[i].second - front[i]), abs(arr[i].second - back[i]));
    if (arr[i].first < idx)
      temp = 0;
    else {
      temp = arr[i].first / idx;
    }
    ans = min(ans, temp);
    if (ans == 0) break;
  }
  if (ans == LLONG_MAX) ans = 0;
  cout << ans << endl;
  return 0;
}
