#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[n + 1], ans = -1;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int lv = 1, rv = 1;
  for (int i = 1; i <= n; i++, lv++)
    if (lv > a[i])
      lv = a[i];
    else
      a[i] = lv;
  for (int i = n; i >= 1; i--, rv++)
    if (rv > a[i])
      rv = a[i];
    else
      a[i] = rv;
  for (int i = 1; i <= n; i++) ans = max(ans, a[i]);
  cout << ans;
  return 0;
}
