#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, a[N], ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  a[1] = a[n] = 1;
  for (int i = 1; i <= n; i++) a[i] = min(a[i], a[i - 1] + 1);
  for (int i = n; i >= 1; i--) a[i] = min(a[i], a[i + 1] + 1);
  for (int i = 1; i <= n; i++) ans = max(ans, a[i]);
  printf("%d\n", ans);
  return 0;
}
