#include <bits/stdc++.h>
using namespace std;
const int MXN = (int)3e5 + 7;
int n, a[111], cnt_1, cnt_2, ans;
vector<pair<int, pair<int, int> > > v;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] && a[i] % 2 == 0) {
      a[i] = 2;
      cnt_2++;
    } else if (a[i] && a[i] % 2 != 0) {
      a[i] = 1;
      cnt_1++;
    }
  }
  if (n == 1) return cout << 0, 0;
  if (!cnt_1 && !cnt_2) return cout << 1, 0;
  cnt_1 = (n / 2 + n % 2) - cnt_1;
  cnt_2 = n / 2 - cnt_2;
  for (int i = 1; i < n; i++) {
    if (a[i] && !a[i + 1]) {
      int l = i;
      i++;
      while (!a[i] && i < n) {
        i++;
      }
      if (a[i] == a[l]) {
        v.push_back({i - l + 1, {l, i}});
      } else if (a[i] != a[l] && a[i]) {
        ans++;
      }
      i--;
    }
    if (a[i] && a[i + 1] && a[i] != a[i + 1]) ans++;
  }
  sort(v.begin(), v.end());
  for (pair<int, pair<int, int> > i : v) {
    int l = i.second.first;
    int r = i.second.second;
    int len = i.first;
    len -= 2;
    if (a[l] == 1) {
      if (cnt_1 >= len) {
        cnt_1 -= len;
      } else
        ans += 2;
    } else if (a[l] == 2) {
      if (cnt_2 >= len) {
        cnt_2 -= len;
      } else
        ans += 2;
    }
  }
  if (!a[1]) {
    int l = 1;
    while (!a[l]) l++;
    int len = l - 1;
    if (a[l] == 1) {
      if (cnt_1 < len)
        ans++;
      else
        cnt_1 -= len;
    } else if (a[l] == 2) {
      if (cnt_2 < len)
        ans++;
      else
        cnt_2 -= len;
    }
  }
  if (!a[n]) {
    int l = n;
    while (!a[l]) l--;
    int len = n - l;
    if (a[l] == 1) {
      if (cnt_1 < len)
        ans++;
      else
        cnt_1 -= len;
    } else if (a[l] == 2) {
      if (cnt_2 < len)
        ans++;
      else
        cnt_2 -= len;
    }
  }
  cout << ans;
  return 0;
}
