#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
int a[maxn];
int n;
int dp[maxn][52][52][3];
int dfs(int i, int po, int pe, int pr) {
  if (i == n + 1) return 0;
  if (dp[i][po][pe][pr] != -1) return dp[i][po][pe][pr];
  int ans = 0;
  if (a[i] != 0) {
    int cost = (a[i] % 2) != (pr % 2);
    ans = dfs(i + 1, po, pe, a[i] & 1) + (cost && pr != 2);
  } else {
    int Po = 999;
    int Pe = 999;
    if (po - 1 >= 1) {
      Po = dfs(i + 1, po - 1, pe, 1) + (((pr & 1) == 0) && pr != 2);
    }
    if (pe - 1 >= 1) {
      Pe = dfs(i + 1, po, pe - 1, 0) + ((pr & 1) && pr != 2);
    }
    ans = min(Po, Pe);
  }
  return dp[i][po][pe][pr] = ans;
}
int main() {
  scanf("%d", &n);
  int o = n - n / 2;
  int e = n / 2;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i]) {
      if (a[i] & 1) {
        o--;
      } else {
        e--;
      }
    }
  }
  memset(dp, -1, sizeof(dp));
  printf("%d\n", dfs(1, o + 1, e + 1, 2));
}
