#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
const int inf = 1034567891;
const long long LL_INF = 1234567890123456789ll;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <typename T>
T GCD(T a, T b) {
  long long t;
  while (a) {
    t = a;
    a = b % a;
    b = t;
  }
  return b;
}
template <typename T>
string toString(T a) {
  return to_string(a);
}
template <typename T>
void toInt(string s, T& x) {
  stringstream str(s);
  str >> x;
}
inline int add(int x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline int sub(int x, int y) {
  x -= y;
  if (x < 0) x += mod;
  return x;
}
inline int mul(int x, int y) { return (x * 1ll * y) % mod; }
inline int powr(int a, long long b) {
  int x = 1 % mod;
  while (b) {
    if (b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline int inv(int a) { return powr(a, mod - 2); }
const int N = 105;
int n;
bool vis[N];
vector<int> vec;
int dp[N][N][N][2];
int fun(int ind, int prev, int o, int e) {
  if (ind == n) {
    return 0;
  }
  if (dp[ind][o][e][prev] != -1) return dp[ind][o][e][prev];
  int ans = inf;
  if (vec[ind] != -1) {
    if (ind == 0)
      ans = min(ans, fun(ind + 1, vec[ind], o, e));
    else
      ans = min(ans, (prev ^ vec[ind]) + fun(ind + 1, vec[ind], o, e));
  } else {
    if (ind == 0) {
      if (o && e) {
        ans = min(ans, fun(ind + 1, 1, o - 1, e));
        ans = min(ans, fun(ind + 1, 0, o, e - 1));
      } else if (o) {
        ans = min(ans, fun(ind + 1, 1, o - 1, e));
      } else {
        ans = min(ans, fun(ind + 1, 0, o, e - 1));
      }
    } else {
      if (o && e) {
        ans = min(ans, (1 ^ prev) + fun(ind + 1, 1, o - 1, e));
        ans = min(ans, prev + fun(ind + 1, 0, o, e - 1));
      } else if (o) {
        ans = min(ans, (1 ^ prev) + fun(ind + 1, 1, o - 1, e));
      } else {
        ans = min(ans, prev + fun(ind + 1, 0, o, e - 1));
      }
    }
  }
  return dp[ind][o][e][prev] = ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  int v;
  for (int i = 0; i < n; i++) {
    cin >> v;
    if (v == 0)
      vec.push_back(-1);
    else
      vec.push_back(v & 1);
    vis[v] = true;
  }
  int o = 0, e = 0;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      o += (i & 1);
      e += !(i & 1);
    }
  }
  memset(dp, -1, sizeof(dp));
  int ans = fun(0, 0, o, e);
  cout << ans << '\n';
  return 0;
}
