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