#include <bits/stdc++.h>
using namespace std;
int n, p[200], e[2], re[2], cc;
vector<int> c[2];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(10);
  cin >> n;
  int j = -1, pp[2] = {-1, -1}, s[2];
  for (int i = 0; i < n; i++) {
    cin >> p[i];
    if (p[i] > 0) {
      pp[1] = i;
      e[p[i] & 1]++;
      if (j == -1)
        pp[0] = i;
      else if ((p[i] & 1) == (p[j] & 1))
        c[p[i] & 1].push_back(i - j - 1);
      else
        cc++;
      j = i;
    }
  }
  if (pp[0] == -1) {
    cout << (n == 1 ? 0 : 1) << "\n";
    return 0;
  }
  re[0] = n / 2 - e[0];
  re[1] = n - n / 2 - e[1];
  int comp = 0;
  for (int k = 0; k < 2; k++) {
    sort(c[k].begin(), c[k].end());
    while (re[k] != 0) {
      int i = 0;
      while (i < ((int)((c[k]).size())) && c[k][i] == 0) i++;
      if (i < ((int)((c[k]).size())) && re[k] >= c[k][i]) {
        int ch = min(c[k][i], re[k]);
        c[k][i] -= ch;
        re[k] -= ch;
      } else
        break;
    }
  }
  s[0] = pp[0];
  s[1] = n - pp[1] - 1;
  int ind = 0;
  if (pp[0] > n - pp[1] - 1) ind = 1;
  if (re[p[pp[ind]] & 1] >= s[ind])
    re[p[pp[ind]] & 1] -= s[ind];
  else
    comp++;
  ind = 1 - ind;
  if (re[p[pp[ind]] & 1] >= s[ind])
    re[p[pp[ind]] & 1] -= s[ind];
  else
    comp++;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < ((int)((c[i]).size())); j++)
      if (c[i][j]) comp += 2;
  comp += cc;
  cout << comp << "\n";
}
