#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  set<int> st;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    st.insert(i);
  }
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    auto it = st.find(a[i]);
    if (it != st.end()) {
      st.erase(it);
    }
  }
  int even = 0;
  int odd = 0;
  for (auto it = st.begin(); it != st.end(); it++) {
    if ((*it) % 2 == 0) {
      even++;
    } else {
      odd++;
    }
  }
  int dp[n][even + 1][odd + 1][2];
  int zerostillnow[n];
  int ctr = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == 0) {
      ctr++;
    }
    zerostillnow[i] = ctr;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= even; j++) {
      for (int k = 0; k <= odd; k++) {
        dp[i][j][k][0] = -1;
        dp[i][j][k][1] = -1;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= even; j++) {
      for (int k = 0; k <= odd; k++) {
        if (zerostillnow[i] != (even + odd) - (j + k)) {
          continue;
        } else {
          if (a[i] == 0) {
            if (i != 0 && j != even) {
              if (dp[i - 1][j + 1][k][0] != -1) {
                dp[i][j][k][0] = dp[i - 1][j + 1][k][0];
                if (dp[i - 1][j + 1][k][1] != -1) {
                  if (dp[i - 1][j + 1][k][1] + 1 < dp[i][j][k][0]) {
                    dp[i][j][k][0] = dp[i - 1][j + 1][k][1] + 1;
                  }
                }
              } else if (dp[i - 1][j + 1][k][1] != -1) {
                dp[i][j][k][0] = dp[i - 1][j + 1][k][1] + 1;
              }
            }
            if (i != 0 && k != odd) {
              if (dp[i - 1][j][k + 1][1] != -1) {
                dp[i][j][k][1] = dp[i - 1][j][k + 1][1];
                if (dp[i - 1][j][k + 1][0] != -1) {
                  if (dp[i - 1][j][k + 1][0] + 1 < dp[i][j][k][1]) {
                    dp[i][j][k][1] = dp[i - 1][j][k + 1][0] + 1;
                  }
                }
              } else if (dp[i - 1][j][k + 1][0] != -1) {
                dp[i][j][k][1] = dp[i - 1][j][k + 1][0] + 1;
              }
            }
            if (i == 0) {
              if (even == j) {
                dp[i][j][k][1] = 0;
              }
              if (odd == k) {
                dp[i][j][k][0] = 0;
              }
            }
          } else {
            if (i == 0) {
              if (a[i] % 2 == 0) {
                dp[i][j][k][0] = 0;
              } else {
                dp[i][j][k][1] = 0;
              }
            } else {
              if (a[i] % 2 == 0) {
                if (dp[i - 1][j][k][0] != -1) {
                  dp[i][j][k][0] = dp[i - 1][j][k][0];
                  if (dp[i - 1][j][k][1] != -1) {
                    if (dp[i - 1][j][k][1] + 1 < dp[i][j][k][0]) {
                      dp[i][j][k][0] = dp[i - 1][j][k][1] + 1;
                    }
                  }
                } else if (dp[i - 1][j][k][1] != -1) {
                  dp[i][j][k][0] = dp[i - 1][j][k][1] + 1;
                }
              } else {
                if (dp[i - 1][j][k][0] != -1) {
                  dp[i][j][k][1] = dp[i - 1][j][k][0] + 1;
                  if (dp[i - 1][j][k][1] != -1) {
                    if (dp[i - 1][j][k][1] < dp[i][j][k][1]) {
                      dp[i][j][k][1] = dp[i - 1][j][k][1];
                    }
                  }
                } else if (dp[i - 1][j][k][1] != -1) {
                  dp[i][j][k][1] = dp[i - 1][j][k][1];
                }
              }
            }
          }
        }
      }
    }
  }
  if (dp[n - 1][0][0][0] != -1) {
    if (dp[n - 1][0][0][1] != -1) {
      if (dp[n - 1][0][0][0] < dp[n - 1][0][0][1]) {
        cout << dp[n - 1][0][0][0];
      } else {
        cout << dp[n - 1][0][0][1];
      }
    } else {
      cout << dp[n - 1][0][0][0];
    }
  } else {
    cout << dp[n - 1][0][0][1];
  }
  return 0;
}
