func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   vector<int> arr;   int dp[101][101][101][2];   int solve(int index, int even, int odd, int pre) {     if (index == n + 1) return 0;     if (dp[index][even][odd][pre] != -1) return dp[index][even][odd][pre];     if (arr[index] != 0) {       int ans = solve(index + 1, even, odd, arr[index] % 2);       if (pre != -1) {         if ((arr[index] % 2) != pre) ans++;       }       return ans;     }     int ans = INT_MAX;     if (even > 0) {       ans = min(ans, solve(index + 1, even - 1, odd, 0) + (pre == 1));     }     if (odd > 0) {       ans = min(ans, solve(index + 1, even, odd - 1, 1) + (pre == 0));     }     dp[index][even][odd][pre] = ans;     return ans;   }   int main() {     ios_base::sync_with_stdio(false);     cout.tie(0);     cin.tie(NULL);     cin >> n;     for (int i = 0; i < 101; i++) {       for (int j = 0; j < 101; j++) {         for (int k = 0; k < 101; k++) {           dp[i][j][k][0] = dp[i][j][k][1] = -1;         }       }     }     arr.resize(n + 1);     int even = n / 2;     int odd = (n + 1) / 2;     for (int i = 1; i <= n; i++) {       cin >> arr[i];       if (arr[i] % 2)         odd--;       else if (arr[i])         even--;     }     int ans = solve(1, even, odd, -1);     cout << ans << endl;     return 0;   }   