func_code_string: #include <bits/stdc++.h>   #pragma GCC_OPTIMAZE( ofast )   using namespace std;   signed main() {     long long n;     cin >> n;     vector<long long> arr(n);     for (long long i = 0; i < n; i++) {       cin >> arr[i];       arr[i]--;     }     long long cnt = 0, pos = 0;     while (pos < n) {       cnt++;       long long mx = pos;       while (pos < n && pos <= mx) {         mx = max(mx, arr[pos]);         pos++;       }     }     cout << cnt << endl;   }   