#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> arr;
  int birler = n / 2 + n % 2;
  int ikiler = n / 2;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a != 0) {
      if (a % 2)
        birler--;
      else
        ikiler--;
    }
    arr.push_back(a);
  }
  vector<pair<int, pair<int, int> > > calc;
  pair<int, int> bas, son;
  int uc = 0;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] == 0)
      cnt++;
    else if (arr[i] % 2 == 0) {
      calc.push_back(make_pair(cnt, make_pair(uc, 2)));
      cnt = 0;
      uc = 2;
    } else {
      calc.push_back(make_pair(cnt, make_pair(uc, 1)));
      cnt = 0;
      uc = 1;
    }
  }
  son = make_pair(cnt, uc);
  if (cnt == n) {
    if (n == 1)
      cout << 0 << endl;
    else
      cout << 1 << endl;
    exit(0);
  }
  sort(calc.begin(), calc.end());
  int ans = 0;
  for (auto eleman : calc) {
    if (eleman.second.first == 0) {
      bas = make_pair(eleman.first, eleman.second.second);
    } else {
      if (eleman.second.first != eleman.second.second) {
        ans++;
      } else {
        if (eleman.second.first == 1) {
          if (birler >= eleman.first)
            birler -= eleman.first;
          else
            ans += 2;
        } else {
          if (ikiler >= eleman.first)
            ikiler -= eleman.first;
          else
            ans += 2;
        }
      }
    }
  }
  if (bas.first < son.first) {
    if (bas.second == 1) {
      if (birler >= bas.first)
        birler -= bas.first;
      else
        ans += 1;
    } else {
      if (ikiler >= bas.first)
        ikiler -= bas.first;
      else
        ans += 1;
    }
    if (son.second == 1) {
      if (birler >= son.first)
        birler -= son.first;
      else
        ans += 1;
    } else {
      if (ikiler >= son.first)
        ikiler -= son.first;
      else
        ans += 1;
    }
  } else {
    if (son.second == 1) {
      if (birler >= son.first)
        birler -= son.first;
      else
        ans += 1;
    } else {
      if (ikiler >= son.first)
        ikiler -= son.first;
      else
        ans += 1;
    }
    if (bas.second == 1) {
      if (birler >= bas.first)
        birler -= bas.first;
      else
        ans += 1;
    } else {
      if (ikiler >= bas.first)
        ikiler -= bas.first;
      else
        ans += 1;
    }
  }
  cout << ans << endl;
}
