#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> ar(n);
  int e = n / 2;
  int o = ceil((double)n / 2.0);
  for (int i = 0; i < n; ++i) {
    cin >> ar[i];
    if (ar[i] == 0) continue;
    if (ar[i] % 2 == 0) {
      e--;
    } else {
      o--;
    }
  }
  int i;
  int ans = 0;
  vector<pair<pair<int, int>, bool>> sizes;
  for (int i = 1; i < n; ++i) {
    if (ar[i - 1] != 0 && ar[i] != 0 && ar[i - 1] % 2 != ar[i] % 2) ans++;
  }
  for (i = 0; i < n; ++i) {
    if (ar[i] == 0) {
      int j = i;
      while (j < n && ar[j] == 0) {
        j++;
      }
      if (j - i == n) {
        sizes.push_back(make_pair(make_pair(n, 1), true));
      } else if (i == 0) {
        sizes.push_back(make_pair(make_pair(j, ar[j] % 2), true));
      } else if (j == n) {
        sizes.push_back(make_pair(make_pair(n - i, ar[i - 1] % 2), true));
      } else {
        if (ar[i - 1] % 2 == ar[j] % 2) {
          sizes.push_back(make_pair(make_pair(j - i, ar[i - 1] % 2), false));
        } else {
          ans++;
        }
      }
      i = j;
    }
  }
  sort(sizes.begin(), sizes.end());
  for (auto x : sizes) {
    if (x.second == true) continue;
    if (x.first.second == 0) {
      if (e >= x.first.first) {
        e -= x.first.first;
      } else {
        ans += 2;
      }
    } else {
      if (o >= x.first.first) {
        o -= x.first.first;
      } else {
        ans += 2;
      }
    }
  }
  for (auto x : sizes) {
    if (x.second == false) continue;
    if (x.first.second == 0) {
      if (e >= x.first.first) {
        e -= x.first.first;
      } else {
        ans++;
      }
    } else {
      if (o >= x.first.first) {
        o -= x.first.first;
      } else {
        ans++;
      }
    }
  }
  cout << ans << '\n';
  return 0;
}
