#include <bits/stdc++.h>
using namespace std;
int n, a[111], f[105][2][105], tot[105], pre[105];
int main() {
  memset(f, 0x3f3f3f3f, sizeof(f));
  cin >> n;
  int ji = 0, ou = 0, sum = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    tot[a[i]]++;
    if (a[i] == 0) {
      pre[i] = pre[i - 1] + 1;
      a[i] = -1;
    } else {
      pre[i] = pre[i - 1];
      a[i] %= 2;
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (!tot[i]) {
      if (i % 2 == 0)
        ou++;
      else
        ji++;
    }
  }
  sum = ji + ou;
  if (a[1] != -1)
    f[1][a[1]][ji] = 0;
  else {
    if (ji > 0) f[1][1][ji - 1] = 0;
    if (ou > 0) f[1][0][ji] = 0;
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= 1; ++j) {
      for (int k1 = 0; k1 <= ji; ++k1) {
        int k2 = sum - k1 - pre[i];
        if (f[i][j][k1] != 0x3f3f3f3f) {
          if (a[i + 1] == 0) {
            if (j == 0) {
              f[i + 1][0][k1] = min(f[i + 1][0][k1], f[i][j][k1]);
            } else {
              f[i + 1][0][k1] = min(f[i + 1][0][k1], f[i][j][k1] + 1);
            }
          } else if (a[i + 1] == 1) {
            if (j == 1) {
              f[i + 1][1][k1] = min(f[i + 1][1][k1], f[i][j][k1]);
            } else {
              f[i + 1][1][k1] = min(f[i + 1][1][k1], f[i][j][k1] + 1);
            }
          } else {
            if (k1 > 0) {
              if (j == 1) {
                f[i + 1][1][k1 - 1] = min(f[i + 1][1][k1 - 1], f[i][j][k1]);
              } else {
                f[i + 1][1][k1 - 1] = min(f[i + 1][1][k1 - 1], f[i][j][k1] + 1);
              }
            }
            if (k2 > 0) {
              if (j == 0) {
                f[i + 1][0][k1] = min(f[i + 1][0][k1], f[i][j][k1]);
              } else {
                f[i + 1][0][k1] = min(f[i + 1][0][k1], f[i][j][k1] + 1);
              }
            }
          }
        }
      }
    }
  }
  int ans = 0x3f3f3f3f;
  for (int k1 = 0; k1 <= ji; ++k1)
    ans = min(ans, min(f[n][0][k1], f[n][1][k1]));
  cout << ans << endl;
  return 0;
}
