#include <bits/stdc++.h>
using namespace std;
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> p;
  vector<pair<int, int> > v, v2;
  p.push_back(-1);
  int cnt1 = 0, cnt0 = 0;
  for (int i = 0; i < (int)(n); i++) {
    int tmp;
    cin >> tmp;
    if (tmp != 0) {
      if (tmp % 2 == 0)
        cnt0++;
      else
        cnt1++;
    }
    p.push_back(tmp);
  }
  p.push_back(-1);
  cnt0 = n / 2 - cnt0;
  cnt1 = (n + 1) / 2 - cnt1;
  int ans = 0;
  for (int i = (int)(1); i <= (int)(n - 1); i++) {
    if (p[i] % 2 != p[i + 1] % 2 && p[i] != 0 && p[i + 1] != 0) ans++;
  }
  int now = -1, cnt = 0;
  for (int i = 0; i < (int)(n + 2); i++) {
    if (p[i] != 0) {
      if (cnt == 0) {
        now = p[i];
        continue;
      }
      if (now % 2 == p[i] % 2 || now == -1 || p[i] == -1) {
        if (now != -1 && p[i] != -1) {
          v.emplace_back(cnt, p[i] % 2);
        } else {
          v2.emplace_back(cnt, max(now, p[i]) % 2);
        }
      } else {
        ans++;
      }
      now = p[i];
      cnt = 0;
    } else
      cnt++;
  }
  sort((v.begin()), (v.end()));
  sort((v2.begin()), (v2.end()));
  int sz = v.size();
  for (int i = 0; i < (int)(sz); i++) {
    int width = v[i].first;
    int parity = v[i].second;
    if (parity == 0) {
      if (cnt0 >= width)
        cnt0 -= width;
      else {
        ans += 2;
      }
    } else {
      if (cnt1 >= width)
        cnt1 -= width;
      else {
        ans += 2;
      }
    }
  }
  sz = v2.size();
  for (int i = 0; i < (int)(sz); i++) {
    int width = v2[i].first;
    int parity = v2[i].second;
    if (parity == 0) {
      if (cnt0 >= width)
        cnt0 -= width;
      else {
        ans++;
      }
    } else {
      if (cnt1 >= width)
        cnt1 -= width;
      else {
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
