#include <bits/stdc++.h>
using namespace std;
int h[100000];
int d[100000];
int main() {
  int n;
  cin >> n;
  for (int a = 0; a < n; ++a) {
    cin >> h[a];
  }
  d[0] = 1;
  int ret = 1;
  for (int a = 1; a < n; ++a) {
    d[a] = min(d[a - 1] + 1, h[a]);
  }
  d[n - 1] = 1;
  for (int a = n - 2; a >= 0; --a) {
    d[a] = min(d[a + 1] + 1, d[a]);
  }
  for (int a = 0; a < n; ++a) ret = max(ret, d[a]);
  cout << ret;
  return 0;
}
