#include <bits/stdc++.h>
using namespace std;
int h[100000];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < n; i++) scanf("%d", &h[i]);
    h[0] = 1;
    for (int i = 1; i <= n; i++) {
      h[i] = min(h[i], h[i - 1] + 1);
    }
    h[n - 1] = 1;
    for (int i = n - 2; i >= 0; i--) {
      h[i] = min(h[i], h[i + 1] + 1);
    }
    int maxx = 0;
    for (int i = 0; i < n; i++) maxx = max(maxx, h[i]);
    printf("%d\n", maxx);
  }
  return 0;
}
