#include <bits/stdc++.h>
using namespace std;
int n, p[200], mmap[200], oddRem, evenRem, F, L;
vector<int> nonZero;
vector<pair<int, pair<int, int> > > odd, even;
bool isOdd(int num) {
  if (num & 1) return 1;
  return 0;
}
bool isEven(int num) {
  if (num & 1) return 0;
  return 1;
}
void consecutiveOdd() {
  for (int i = 0; i < nonZero.size() - 1; i++) {
    if (p[nonZero[i]] % 2 == 1 && p[nonZero[i + 1]] % 2 == 1) {
      if (nonZero[i + 1] - nonZero[i] - 1 > 0)
        odd.push_back({nonZero[i + 1] - nonZero[i] - 1,
                       {nonZero[i] + 1, nonZero[i + 1] - 1}});
    }
  }
  if (odd.size()) sort(odd.rbegin(), odd.rend());
}
void consecutiveEven() {
  for (int i = 0; i < nonZero.size() - 1; i++) {
    if (p[nonZero[i]] % 2 == 0 && p[nonZero[i + 1]] % 2 == 0) {
      if (nonZero[i + 1] - nonZero[i] - 1 > 0)
        even.push_back({nonZero[i + 1] - nonZero[i] - 1,
                        {nonZero[i] + 1, nonZero[i + 1] - 1}});
    }
  }
  if (even.size()) sort(even.rbegin(), even.rend());
}
void remainingOddEven() {
  for (int i = 1; i <= n; i++) {
    if (mmap[i] == 0) {
      if (i % 2 == 0)
        evenRem++;
      else
        oddRem++;
    }
  }
}
void fillupConsecutiveOdd() {
  while (odd.size() && oddRem >= odd.back().first) {
    for (int i = odd.back().second.first; i <= odd.back().second.second; i++) {
      p[i] = 1;
      oddRem--;
    }
    odd.pop_back();
  }
}
void fillupConsecutiveEven() {
  while (even.size() && evenRem >= even.back().first) {
    for (int i = even.back().second.first; i <= even.back().second.second;
         i++) {
      p[i] = 2;
      evenRem--;
    }
    even.pop_back();
  }
}
int fun() {
  int res = 0;
  if (p[F] % 2 == 0) {
    if (evenRem >= F - 1)
      evenRem -= F - 1;
    else
      res++;
  } else {
    if (oddRem >= F - 1)
      oddRem -= F - 1;
    else
      res++;
  }
  if (p[L] % 2 == 0) {
    if (evenRem >= n - L)
      evenRem -= n - L;
    else
      res++;
  } else {
    if (oddRem >= n - L)
      oddRem -= n - L;
    else
      res++;
  }
  return res;
}
void solve() {
  int sum = 0;
  for (int i = F; i <= L - 1; i++) {
    if (p[i] && p[i + 1]) {
      if ((isOdd(p[i]) && isOdd(p[i + 1])) ||
          (isEven(p[i]) && isEven(p[i + 1])))
        continue;
      else
        sum++;
    } else {
      int a = p[i];
      i++;
      while (p[i] == 0) i++;
      int b = p[i];
      i--;
      if (((isOdd(a) && isOdd(b)) || (isEven(a) && isEven(b))) && a != b &&
          (a != 0 && b != 0))
        sum += 2;
      else
        sum++;
    }
  }
  sum += fun();
  cout << sum << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  bool ok = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    mmap[p[i]] = 1;
    if (p[i]) ok = 1;
  }
  remainingOddEven();
  if (n == 1) {
    cout << fun() << endl;
    return 0;
  }
  if (ok == 0) {
    if (n == 1)
      cout << 0 << endl;
    else
      cout << 1 << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (p[i]) {
      F = i;
      if (p[i] % 2 == 1)
        p[0] = 1;
      else
        p[0] = 2;
      break;
    }
  }
  for (int i = n; i >= 1; i--) {
    if (p[i]) {
      L = i;
      if (p[i] % 2 == 1)
        p[n + 1] = 1;
      else
        p[n + 1] = 2;
      break;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (p[i]) nonZero.push_back(i);
  }
  consecutiveOdd();
  consecutiveEven();
  if (odd.size()) fillupConsecutiveOdd();
  if (even.size()) fillupConsecutiveEven();
  solve();
  return 0;
}
