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