#include <bits/stdc++.h>
using namespace std;
int dp[101][101][101][3];
long long ev, od;
vector<long long> A;
long long n;
int solve(long long idx, long long evs, long long ods, long long prev) {
  if (evs == ev && od == ods) {
    return 0;
  }
  if (idx == n || evs > ev || ods > od) return 1000000;
  int &res = dp[idx][evs][ods][prev];
  if (res != -1) return res;
  res = 0;
  if (A[idx] != 0) {
    if (A[idx] % 2 == 0)
      res = (prev != 2 ? 1 : 0) + solve(idx + 1, evs + 1, ods, 2);
    else
      res = (prev != 1 ? 1 : 0) + solve(idx + 1, evs, ods + 1, 1);
  } else {
    res = min((prev != 2 ? 1 : 0) + solve(idx + 1, evs + 1, ods, 2),
              (prev != 1 ? 1 : 0) + solve(idx + 1, evs, ods + 1, 1));
  }
  return res;
}
int main() {
  memset(dp, -1, sizeof(dp));
  scanf("%lld", &n);
  if (n % 2) {
    ev = n / 2;
    od = (n + 1) / 2;
  } else {
    ev = n / 2;
    od = n / 2;
  }
  A.resize(n);
  for (long long i = 0; i < (n); i++) {
    scanf("%lld", &A[i]);
    if (A[i] == 0) continue;
    if (A[i] % 2)
      A[i] = 1;
    else
      A[i] = 2;
  }
  printf("%d\n", solve(0, 0, 0, 0) - 1);
  return 0;
}
