#include <bits/stdc++.h>
using namespace std;
const int M = 100007;
int t[M], pre[M];
int main() {
  int n;
  scanf("%d", &n);
  int maksi = 0;
  for (int i = 0; i < n; i++) scanf("%d", &t[i]);
  t[0] = 1;
  t[n - 1] = 1;
  pre[0] = 0;
  for (int i = 1; i < n; i++) t[i] = min(t[i], t[i - 1] + 1);
  for (int i = n - 2; i >= 0; i--) t[i] = min(t[i], t[i + 1] + 1);
  for (int i = 0; i < n; i++) maksi = max(maksi, t[i]);
  printf("%d\n", maksi);
}
