func_code_string: #include <bits/stdc++.h>   int inp() {     char c = getchar();     int neg = 1;     while (c <  0  || c >  9 ) {       if (c ==  - ) neg = -1;       c = getchar();     }     int sum = 0;     while (c >=  0  && c <=  9 ) {       sum = sum * 10 + c -  0 ;       c = getchar();     }     return sum * neg;   }   int a[110];   int f[110][110][110][2];   bool flg[110];   int main() {     int n = inp();     int l1 = (n >> 1), l2 = (n >> 1);     if (n & 1) l2++;     int ans = 0;     for (int i = 1; i <= n; i++) {       a[i] = inp();       if (a[i] != 0) {         if (a[i] & 1)           l2--;         else           l1--;         if (a[i - 1] && ((a[i] ^ a[i - 1]) & 1)) ans++;       } else         flg[i] = true;     }     memset(f, 0x3f, sizeof(f));     f[1][l1][l2][0] = f[1][l1][l2][1] = 0;     for (int i = 1; i <= n; i++)       for (int j = 0; j <= n; j++)         for (int u = 0; u <= n; u++) {           for (int k = 0; k <= 1; k++) {             if (f[i][j][u][k] > 1e9) continue;             if (flg[i - 1]) a[i - 1] = k;             if (a[i] != 0) {               if (i > 1 && ((a[i] ^ a[i - 1]) & 1)) f[i][j][u][k]++;               f[i + 1][j][u][k] = f[i][j][u][k];               continue;             }             if (j) {               int ret = f[i][j][u][k];               if (i > 1) ret += (a[i - 1] & 1);               f[i + 1][j - 1][u][0] = std::min(f[i + 1][j - 1][u][0], ret);             }             if (u) {               int ret = f[i][j][u][k];               if (i > 1) ret += (a[i - 1] & 1) ^ 1;               f[i + 1][j][u - 1][1] = std::min(f[i + 1][j][u - 1][1], ret);             }           }         }     printf( %d n , std::min(f[n + 1][0][0][0], f[n + 1][0][0][1]));   }   