#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
long long n, a[105], jo[2], l, s, r, len, jox, ans;
vector<long long> v[2];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  scanf("%lld", &n);
  jo[0] = n / 2;
  jo[1] = n - jo[0];
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    if (a[i]) jo[a[i] % 2]--;
  }
  l = -1;
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) {
      s++;
      continue;
    }
    r = a[i] % 2;
    if (l == -1) {
      len = s;
      jox = r;
    } else if (l != r)
      ans++;
    else
      v[r].push_back(s);
    l = r;
    s = 0;
  }
  if (l == -1) {
    if (n > 1)
      printf("1\n");
    else
      printf("0\n");
    return 0;
  }
  for (int i = 0; i <= 1; i++) {
    ans += v[i].size() * 2;
    sort(v[i].begin(), v[i].end());
    for (int j = 0; j < v[i].size(); j++) {
      if (jo[i] >= v[i][j]) {
        ans -= 2;
        jo[i] -= v[i][j];
      }
    }
  }
  if (jo[jox] >= len)
    jo[jox] -= len;
  else
    ans++;
  if (jo[l] >= s)
    jo[l] -= s;
  else
    ans++;
  printf("%lld\n", ans);
  return 0;
}
