#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int MAXN = 100005;
const int INF = 2e9;
int n, a[MAXN];
int m[MAXN];
void solve() {
  for (int i = 0; i < n; i++) {
    m[i] = a[i];
  }
  m[0] = m[n - 1] = 1;
  for (int i = 1; i < n; i++) {
    m[i] = min(m[i], m[i - 1] + 1);
  }
  for (int i = n - 2; i >= 0; i--) {
    m[i] = min(m[i], m[i + 1] + 1);
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    ans = max(ans, m[i]);
  }
  printf("%d\n", ans);
}
int main() {
  while (scanf("%d", &n) == 1) {
    for (int i = 0; i < n; i++) {
      scanf("%d", a + i);
    }
    solve();
  }
}
