#include <bits/stdc++.h>
using namespace std;
int const N = 100, inf = 1e9;
int x[N + 1], dp[N + 1][N + 1][N + 1][2];
void up(int &x, int y) {
  if (y < x) x = y;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i < (int)(n + 1); ++i) scanf("%d", x + i);
  for (int i = 0; i < (int)(n + 1); ++i)
    for (int j = 0; j < (int)(n + 1); ++j)
      for (int k = 0; k < (int)(n + 1); ++k)
        for (int w = 0; w < (int)(2); ++w) dp[i][j][k][w] = inf;
  dp[0][n + 1 >> 1][n >> 1][0] = dp[0][n + 1 >> 1][n >> 1][1] = 0;
  for (int i = 0; i < (int)(n); ++i)
    for (int j = 0; j < (int)(n + 1); ++j)
      for (int k = 0; k < (int)(n + 1); ++k)
        for (int w = 0; w < (int)(2); ++w) {
          int &r = dp[i][j][k][w];
          if (r == inf) continue;
          if (j && (x[i + 1] == 0 || x[i + 1] & 1))
            up(dp[i + 1][j - 1][k][1], r + (w == 0));
          if (k && (x[i + 1] == 0 || !(x[i + 1] & 1)))
            up(dp[i + 1][j][k - 1][0], r + (w == 1));
        }
  printf("%d\n", min(dp[n][0][0][0], dp[n][0][0][1]));
}
