func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   string a;   int f[1005][5];   int main() {     cin >> n >> a;     string t =   , s =   ;     char cur =  0 ;     for (int i = 0; i <= n - 1; i++) {       t += cur;       s +=  1  - cur +  0 ;       cur =  1  - cur +  0 ;     }     int ans = (int)2e9;     int res = 0, res1 = 0;     for (int i = 0; i <= n - 1; i++) {       if (a[i] != s[i]) res++;       if (a[i] != t[i]) res1++;     }     ans = min(res1, res);     cout << ans;   }   