#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> p(n);
  int cnteven = n / 2;
  for (int i = 0; i < n; ++i) {
    cin >> p[i];
    if (p[i] == 0)
      p[i] = -1;
    else
      p[i] %= 2;
    if (p[i] == 0) cnteven--;
  }
  vector<vector<int> > dp(2, vector<int>(n + 1, INF));
  dp[0][cnteven] = 0;
  dp[1][cnteven] = 0;
  for (int i = 0; i < n; ++i) {
    vector<vector<int> > nou(2, vector<int>(n + 1, INF));
    if (p[i] == -1) {
      for (int j = 0; j < n; ++j) {
        nou[0][j] = min(dp[0][j + 1], dp[1][j + 1] + 1);
        nou[1][j] = min(dp[0][j] + 1, dp[1][j]);
      }
    } else {
      for (int j = 0; j < n; ++j) {
        nou[p[i]][j] = min(dp[0][j] + (p[i] != 0), dp[1][j] + (p[i] != 1));
      }
    }
    dp = nou;
  }
  cout << min(dp[0][0], dp[1][0]) << endl;
}
