func_code_string: #include <bits/stdc++.h>   using namespace std;   int a[111111], b[111111], c[111111];   int main() {     int n;     cin >> n;     for (int i = 1; i <= n; ++i) {       cin >> a[i];     }     for (int i = 1; i <= n; ++i) {       b[i] = min(a[i], min(b[i - 1] + 1, i));     }     reverse(a + 1, a + n + 1);     for (int i = 1; i <= n; ++i) {       c[i] = min(a[i], min(c[i - 1] + 1, i));     }     reverse(c + 1, c + n + 1);     int ans = 0;     for (int i = 1; i <= n; ++i) {       ans = max(ans, min(b[i], c[i]));     }     cout << ans;     return 0;   }   