#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
using namespace std;
const int N = 101010;
int vec[N], n, x[2][N];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> vec[i];
  }
  n++;
  for (int i = 1; i <= n; i++) {
    x[0][i] = x[0][i - 1] + 1;
    x[0][i] = min(x[0][i], vec[i]);
  }
  for (int i = n; i > 0; i--) {
    x[1][i] = x[1][i + 1] + 1;
    x[1][i] = min(x[1][i], vec[i]);
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    ans = max(ans, min(x[0][i], x[1][i]));
  }
  cout << ans << "\n";
  return 0;
}
