#include <bits/stdc++.h>
using namespace std;
long long a[500];
long long p[4];
vector<pair<long long, pair<long long, long long>>> vp;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, par, nepar, s = 0;
  cin >> n;
  deque<pair<long long, long long>> dq, sq;
  long long las = -1;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    if (a[i] == 0) {
      a[i] = -1;
    } else {
      a[i] &= 1;
      p[a[i]]++;
      dq.push_back({a[i], i});
      if (las != -1 && a[las] == a[i]) {
        vp.push_back({i - las, {las, i}});
      }
      las = i;
    }
  }
  p[0] = (n >> 1) - p[0];
  p[1] = (n >> 1) + (n & 1) - p[1];
  if (dq.empty()) {
    cout << ((n - 1) ? 1 : 0);
    return 0;
  }
  s += (dq.size() - 1 - (vp.size()));
  sort((vp).begin(), (vp).end());
  for (auto x : vp) {
    pair<long long, long long> t = x.second;
    if ((t.second - t.first) - 1 <= p[a[t.first]])
      p[a[t.first]] -= (t.second - t.first) - 1;
    else
      s += 2;
  }
  if (dq.front().second > 0) {
    pair<long long, long long> x = dq.front();
    if (p[x.first] >= x.second) {
      p[x.first] -= x.second;
    } else
      s += 1;
  }
  if (dq.back().second < n - 1) {
    pair<long long, long long> x = dq.back();
    if (p[x.first] >= n - x.second - 1) {
      ;
    } else
      s += 1;
  }
  cout << s;
  return 0;
}
