#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int N = 200003;
const long long mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  if (n == 1) return cout << 0, 0;
  int a[n + 1], i, od = (n + 1) / 2, ev = n / 2, prev = 0, val = 0, ans = 0;
  for (i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] & 1)
      --od;
    else if (a[i])
      --ev;
  }
  vector<int> v[2], sp[2];
  for (i = 1; i <= n; ++i) {
    if (a[i]) {
      if (!prev)
        sp[a[i] & 1].push_back(i - prev - 1);
      else if ((val + a[i]) & 1)
        ++ans;
      else
        v[val & 1].push_back(i - prev - 1);
      val = (a[i] & 1);
      prev = i;
    }
  }
  if (prev) sp[val].push_back(i - prev - 1);
  sort(v[0].begin(), v[0].end());
  sort(v[1].begin(), v[1].end());
  for (auto it : v[0]) {
    if (ev >= it)
      ev -= it;
    else
      ans += 2;
  }
  for (auto it : sp[0]) {
    if (ev >= it)
      ev -= it;
    else
      ++ans;
  }
  for (auto it : v[1]) {
    if (od >= it)
      od -= it;
    else
      ans += 2;
  }
  for (auto it : sp[1]) {
    if (od >= it)
      od -= it;
    else
      ++ans;
  }
  ans = max(ans, 1);
  cout << ans;
  return 0;
}
