#include <bits/stdc++.h>
using namespace std;
vector<long long> a;
long long n;
long long dp[104][104][104][2];
long long fun(long long index, long long type, long long even, long long odd) {
  if (index >= n) return 0;
  if (dp[index][even][odd][type] != -1) return dp[index][even][odd][type];
  long long k = (type) ^ (a[index] % 2);
  if (a[index] == 0) {
    long long p = LLONG_MAX, q = LLONG_MAX;
    if (even) {
      long long x = (type ^ 0);
      p = fun(index + 1, 0, even - 1, odd) + x;
    }
    if (odd) {
      long long y = (type ^ 1);
      q = fun(index + 1, 1, even, odd - 1) + y;
    }
    return dp[index][even][odd][type] = min(p, q);
  }
  return dp[index][even][odd][type] =
             fun(index + 1, a[index] % 2, even, odd) + k;
}
int32_t main() {
  cin >> n;
  long long cnt[n + 1];
  memset(cnt, 0, sizeof(cnt));
  memset(dp, -1, sizeof(dp));
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a.push_back(x);
    if (x == 0) continue;
    cnt[x]++;
  }
  long long odd = 0, even = 0;
  for (long long i = 1; i <= n; i++) {
    if (!cnt[i]) {
      if (i & 1)
        odd++;
      else
        even++;
    }
  }
  if (a[0] == 0) {
    long long p = LLONG_MAX, q = LLONG_MAX;
    if (even) p = fun(1, 0, even - 1, odd);
    if (odd) q = fun(1, 1, even, odd - 1);
    cout << min(p, q);
  } else
    cout << fun(1, a[0] % 2, even, odd);
  return 0;
}
