#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
int n;
int a[205], f[205][5][205];
void Solve() {
  cin >> n;
  int odd = (n + 1) / 2;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] % 2) odd--;
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 0; j <= n; ++j) f[i][0][j] = f[i][1][j] = inf;
  if (a[1])
    f[1][a[1] % 2][odd] = 0;
  else
    f[1][0][odd] = f[1][1][odd - 1] = 0;
  for (int i = 2; i <= n; ++i)
    for (int j = odd; j >= 0; --j)
      if (a[i]) {
        if (a[i - 1])
          f[i][a[i] % 2][j] =
              f[i - 1][a[i - 1] % 2][j] + abs(a[i] - a[i - 1]) % 2;
        else
          f[i][a[i] % 2][j] =
              min(f[i - 1][0][j] + a[i] % 2, f[i - 1][1][j] + (a[i] + 1) % 2);
      } else {
        if (a[i - 1]) {
          f[i][1][j] = f[i - 1][a[i - 1] % 2][j + 1] + (a[i - 1] + 1) % 2;
          f[i][0][j] = f[i - 1][a[i - 1] % 2][j] + a[i - 1] % 2;
        } else {
          f[i][1][j] = min(f[i - 1][1][j + 1], f[i - 1][0][j + 1] + 1);
          f[i][0][j] = min(f[i - 1][1][j] + 1, f[i - 1][0][j]);
        }
      }
  cout << min(f[n][0][0], f[n][1][0]);
}
int main() { Solve(); }
