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