#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
const long long int MAXN = 107;
long long int fastexpo(long long int b, long long int exp) {
  if (exp == 0) return 1;
  if (exp == 1) return b;
  long long int ans = (fastexpo(b, exp / 2) % MOD);
  ans *= ans;
  ans %= MOD;
  if (exp % 2 == 1) {
    ans *= b;
  }
  ans %= MOD;
  return ans;
}
long long int dp[MAXN][MAXN][MAXN][3];
long long int n;
long long int solve(long long int ind, long long int even, long long int odd,
                    vector<long long int> a, long long int last) {
  if (ind == n) {
    return 0;
  }
  if (even == 0 and odd == 0) {
    return 0;
  }
  if (a[ind] != 0) {
    return solve(ind + 1, even, odd, a, a[ind] % 2);
  }
  if (dp[ind][even][odd][last] != -1) {
    return dp[ind][even][odd][last];
  }
  long long int oddsum = 0;
  long long int evensum = 0;
  if (ind == 0) {
    if (a[ind + 1] != 0) {
      if (a[ind + 1] & 1) {
        evensum++;
      } else {
        oddsum++;
      }
    }
  } else if (ind == n - 1) {
    if (a[ind - 1] & 1) {
      evensum++;
    } else {
      oddsum++;
    }
  } else {
    if (a[ind - 1] & 1) {
      evensum++;
    } else {
      oddsum++;
    }
    if (a[ind + 1] != 0) {
      if (a[ind + 1] & 1) {
        evensum++;
      } else {
        oddsum++;
      }
    }
  }
  if (even == 0) {
    vector<long long int> b;
    b = a;
    b[ind] = 1;
    long long int ans = oddsum + solve(ind + 1, even, odd - 1, b, 1);
    return dp[ind][even][odd][last] = ans;
  } else if (odd == 0) {
    vector<long long int> c;
    c = a;
    c[ind] = 2;
    long long int ans = evensum + solve(ind + 1, even - 1, odd, c, 0);
    return dp[ind][even][odd][last] = ans;
  }
  vector<long long int> b, c;
  b = a;
  c = a;
  b[ind] = 1;
  c[ind] = 2;
  long long int ans = min(oddsum + solve(ind + 1, even, odd - 1, b, 1),
                          evensum + solve(ind + 1, even - 1, odd, c, 0));
  return dp[ind][even][odd][last] = ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  vector<long long int> a;
  map<long long int, long long int> cnt;
  memset(dp, -1, sizeof(dp));
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    a.push_back(x);
    cnt[a[i]]++;
  }
  long long int odd = 0;
  long long int even = 0;
  for (long long int i = 1; i <= n; i++) {
    if (cnt[i] == 0) {
      if (i & 1) {
        odd++;
      } else {
        even++;
      }
    }
  }
  long long int ans = 0;
  for (long long int i = 0; i < n - 1; i++) {
    if (a[i] != 0 and a[i + 1] != 0) {
      if (a[i] & 1) {
        if (a[i + 1] % 2 == 0) ans++;
      } else {
        if (a[i + 1] & 1) ans++;
      }
    }
  }
  cout << ans + solve(0, even, odd, a, 2) << endl;
  return 0;
}
