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