#include <bits/stdc++.h>
using namespace std;
long long inp[102];
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.second - a.first < b.second - b.first);
}
int32_t main() {
  long long n;
  cin >> n;
  long long ev = 0;
  long long od = 0;
  long long ans = 0;
  for (long long i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    inp[i] = x;
    if (x == 0) {
      continue;
    } else {
      if (i > 0 && inp[i - 1] != 0) {
        if (inp[i] % 2 != inp[i - 1] % 2) ans++;
      }
    }
    if (x % 2 == 0)
      ev++;
    else
      od++;
  }
  od = n - (od + ev);
  ev = n / 2 - ev;
  od -= ev;
  std::vector<pair<long long, long long> > even, odd;
  long long i = 0;
  while (i < n && inp[i] == 0) {
    i++;
  }
  pair<long long, long long> tempstart, tempend;
  long long flagstart = 0;
  if (i != n && i > 0) {
    tempstart = {0, i - 1};
    if (inp[i] % 2 == 1)
      flagstart = 1;
    else
      flagstart = 2;
  } else if (i == n) {
    if (n != 1) ans++;
  }
  i++;
  long long flagend = 0;
  while (i < n) {
    long long prev = inp[i - 1] % 2;
    long long j = i;
    while (j < n && inp[j] == 0) j++;
    if (j == i) {
      i++;
      continue;
    }
    if (j == n) {
      tempend = {i, j - 1};
      if (prev == 1)
        flagend = 1;
      else
        flagend = 2;
    } else {
      long long fin = inp[j] % 2;
      if (fin == prev) {
        if (prev == 1)
          odd.push_back({i, j - 1});
        else
          even.push_back({i, j - 1});
      } else
        ans++;
    }
    i = j + 1;
  }
  sort(even.begin(), even.end(), sortbysec);
  sort(odd.begin(), odd.end(), sortbysec);
  i = 0;
  long long j = 0;
  while (i < even.size() && ev > even[i].second - even[i].first) {
    ev -= (even[i].second - even[i].first + 1);
    i++;
  }
  while (j < odd.size() && od > odd[j].second - odd[j].first) {
    od -= (odd[j].second - odd[j].first + 1);
    j++;
  }
  if (flagstart) {
    if (flagstart == 2) {
      if (ev > tempstart.second - tempstart.first) {
        ev -= tempstart.second - tempstart.first + 1;
      } else
        ans++;
    } else {
      if (od > tempstart.second - tempstart.first) {
        od -= tempstart.second - tempstart.first + 1;
      } else
        ans++;
    }
  }
  if (flagend) {
    if (flagend == 2) {
      if (ev > tempend.second - tempend.first) {
        ev -= tempend.second - tempend.first + 1;
      } else
        ans++;
    } else {
      if (od > tempend.second - tempend.first) {
        od -= tempend.second - tempend.first + 1;
      } else
        ans++;
    }
  }
  while (i < even.size()) {
    i++;
    ans += 2;
  }
  while (j < odd.size()) {
    ans += 2;
    j++;
  }
  cout << ans << endl;
}
