#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<pair<long long, long long> > p;
  vector<long long> a[2];
  long long ans = 0;
  long long odd = (n + 1) / 2, even = n / 2;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (x > 0) p.push_back({i, x % 2});
    if (x > 0) {
      if (x % 2)
        odd--;
      else
        even--;
    }
  }
  if (n == 1) {
    cout << 0;
    return;
  }
  if (odd + even == n) {
    cout << 1;
    return;
  }
  for (long long i = 0; i < (long long)p.size() - 1; i++) {
    long long l = p[i].first, r = p[i + 1].first, d1 = p[i].second,
              d2 = p[i + 1].second;
    if (d1 == d2) {
      if (d1 == 1)
        a[1].push_back(r - l - 1);
      else
        a[0].push_back(r - l - 1);
    } else
      ans++;
  }
  if (!a[0].empty()) sort((a[0]).begin(), (a[0]).end());
  if (!a[1].empty()) sort((a[1]).begin(), (a[1]).end());
  long long i = 0;
  while (i < (long long)a[0].size() && even >= a[0][i]) {
    even -= a[0][i];
    i++;
  }
  ans += 2 * ((long long)a[0].size() - i);
  i = 0;
  while (i < (long long)a[1].size() && odd >= a[1][i]) {
    odd -= a[1][i];
    i++;
  }
  ans += 2 * ((long long)a[1].size() - i);
  if (p[0].first > 0) {
    if (p[0].second == 1) {
      if (odd < p[0].first)
        ans++;
      else
        odd -= p[0].first;
    }
    if (p[0].second == 0) {
      if (even < p[0].first)
        ans++;
      else
        even -= p[0].first;
    }
  }
  if (p.back().first < n - 1) {
    if (p.back().second == 1 && odd < n - 1 - p.back().first) ans++;
    if (p.back().second == 0 && even < n - 1 - p.back().first) ans++;
  }
  cout << ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long TESTS = 1;
  while (TESTS--) {
    solve();
    cout << '\n';
  }
  return 0;
}
