#include <bits/stdc++.h>
using namespace std;
int a[100005];
int b[100005];
int c[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  b[0] = 1;
  for (int i = 1; i < n; i++) {
    b[i] = min(b[i - 1] + 1, a[i]);
  }
  b[n - 1] = 1;
  for (int i = n - 2; i >= 0; i--) {
    b[i] = min(b[i + 1] + 1, b[i]);
  }
  int ans = 0;
  for (int i = 0; i < n; i++) ans = max(b[i], ans);
  cout << ans << endl;
  return 0;
}
