#include <bits/stdc++.h>
using namespace std;
int n, fst, lst, ans;
int arr[103], num[2];
vector<pair<int, int> > good;
int main() {
  int i, j;
  scanf("%d", &n);
  num[0] = n / 2;
  num[1] = n - num[0];
  arr[0] = -1;
  for (i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    if (!arr[i])
      arr[i] = -1;
    else {
      num[arr[i] &= 1]--;
      if (arr[lst] == arr[i]) {
        if (i - lst - 1) good.push_back({i - lst - 1, arr[i]});
      } else if (fst)
        ans++;
      lst = i;
      if (!fst) fst = lst;
    }
  }
  sort(good.begin(), good.end());
  for (auto p : good) {
    if (num[p.second] >= p.first) {
      num[p.second] -= p.first;
    } else
      ans += 2;
  }
  if (num[arr[fst]] >= fst - 1)
    num[arr[fst]] -= fst - 1;
  else
    ans++;
  if (num[arr[lst]] >= n - lst)
    num[arr[lst]] -= n - lst;
  else
    ans++;
  printf("%d", ans);
  return 0;
}
