#include <bits/stdc++.h>
using namespace std;
int dp1[100010];
int dp2[100010];
int nums[1000010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> nums[i];
  }
  dp1[0] = 1;
  dp2[n - 1] = 1;
  for (int i = 1; i < n; ++i) {
    dp1[i] = min(min(dp1[i - 1] + 1, i + 1), nums[i]);
  }
  for (int i = n - 2; i >= 0; --i) {
    dp2[i] = min(min(dp2[i + 1] + 1, n - i), nums[i]);
  }
  int res = 0;
  for (int i = 0; i < n; ++i) {
    dp1[i] = min(dp1[i], dp2[i]);
    if (dp1[i] > res) {
      res = dp1[i];
    }
  }
  cout << res << endl;
  return 0;
}
