#include <bits/stdc++.h>
using namespace std;
const long long mxn = 105, inf = 1e18;
long long n;
long long dp[mxn][mxn][2], cnt[2], a[mxn];
bool used[mxn];
long long f(long long i, long long even, long long odd, bool p) {
  if (i == n) return 0;
  if (dp[i][even][p] != -1) return dp[i][even][p];
  dp[i][even][p] = inf;
  if (!a[i + 1]) {
    if (even) dp[i][even][p] = f(i + 1, even - 1, odd, 0) + (p ^ 0);
    if (odd)
      dp[i][even][p] =
          min(dp[i][even][p], f(i + 1, even, odd - 1, 1) + (p ^ 1));
  } else {
    long long x = a[i + 1] % 2;
    dp[i][even][p] = f(i + 1, even, odd, x) + (p ^ x);
  }
  return dp[i][even][p];
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
    used[a[i]] = 1;
  }
  for (long long i = 1; i <= n; ++i) {
    if (!used[i]) ++cnt[i % 2];
  }
  memset(dp, -1, sizeof dp);
  if (a[1])
    cout << f(1, cnt[0], cnt[1], a[1] % 2);
  else {
    long long ans = inf;
    if (cnt[0]) ans = f(1, cnt[0] - 1, cnt[1], 0);
    if (cnt[1]) ans = min(ans, f(1, cnt[0], cnt[1], 1));
    cout << ans;
  }
  return 0;
}
