#include <bits/stdc++.h>
using namespace std;
int TAB[200];
int DP[110][110][2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> TAB[i];
  for (int i = 0; i <= 105; i++)
    for (int j = 0; j <= 105; j++)
      for (int g = 0; g <= 1; g++) DP[i][j][g] = 10000;
  DP[0][50][0] = 0;
  DP[0][50][1] = 0;
  for (int pref = 1; pref <= n; pref++) {
    int liczba = TAB[pref];
    if (liczba != 0) {
      if (liczba % 2 == 0) {
        for (int nadmiar_P = 1; nadmiar_P <= 101; nadmiar_P++)
          DP[pref][nadmiar_P][0] = min(DP[pref - 1][nadmiar_P - 1][0],
                                       DP[pref - 1][nadmiar_P - 1][1] + 1);
      } else {
        for (int nadmiar_P = 0; nadmiar_P <= 100; nadmiar_P++)
          DP[pref][nadmiar_P][1] = min(DP[pref - 1][nadmiar_P + 1][0] + 1,
                                       DP[pref - 1][nadmiar_P + 1][1]);
      }
      continue;
    }
    for (int nadmiar_P = 1; nadmiar_P <= 101; nadmiar_P++)
      DP[pref][nadmiar_P][0] = min(DP[pref - 1][nadmiar_P - 1][0],
                                   DP[pref - 1][nadmiar_P - 1][1] + 1);
    for (int nadmiar_P = 0; nadmiar_P <= 100; nadmiar_P++) {
      int x = min(DP[pref - 1][nadmiar_P + 1][0] + 1,
                  DP[pref - 1][nadmiar_P + 1][1]);
      DP[pref][nadmiar_P][1] = min(x, DP[pref][nadmiar_P][1]);
    }
  }
  if (n % 2 == 0)
    cout << min(DP[n][50][0], DP[n][50][1]);
  else
    cout << min(DP[n][49][0], DP[n][49][1]);
  return 0;
}
