#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(47498234);
const long long MOD = 998244353ll;
const long long MOD1 = 1e9 + 7;
const int MAXN = 101;
int a[MAXN];
int cnt[2];
bool used[MAXN];
int add(vector<int>& group, vector<int>& extraCnt, int cnt) {
  int sz = 0;
  int ans = 0;
  for (int i = 0; i < group.size(); i++) {
    if (cnt < sz + group[i]) {
      ans += 2 * ((int)group.size() - i);
      break;
    }
    sz += group[i];
  }
  for (int i = 0; i < extraCnt.size(); i++) {
    if (cnt < sz + extraCnt[i]) {
      ans += (int)extraCnt.size() - i;
      break;
    }
    sz += extraCnt[i];
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cout << fixed << setprecision(20);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    used[a[i]] = 1;
  }
  vector<int> group[2];
  vector<int> extra[2];
  for (int i = 0; i < n; i++) {
    if (!used[i + 1]) {
      cnt[(i + 1) % 2]++;
    }
  }
  int res = 0;
  int pr = -1;
  int curCnt = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == 0) {
      curCnt++;
    } else {
      if (curCnt == 0) {
        if (pr != -1 && a[i - 1] % 2 != a[i] % 2) {
          res++;
        }
      } else {
        if (pr == -1 || pr == a[i] % 2) {
          if (pr == -1) {
            extra[a[i] % 2].push_back(curCnt);
          } else {
            group[a[i] % 2].push_back(curCnt);
          }
        } else {
          res++;
        }
      }
      curCnt = 0;
      pr = a[i] % 2;
    }
  }
  if (n == 1) {
    cout << "0\n";
    exit(0);
  }
  if (pr == -1) {
    cout << "1\n";
    exit(0);
  } else {
    if (curCnt > 0) {
      extra[pr].push_back(curCnt);
    }
  }
  sort(group[0].begin(), group[0].end());
  sort(group[1].begin(), group[1].end());
  sort(extra[0].begin(), extra[0].end());
  sort(extra[1].begin(), extra[1].end());
  res += add(group[0], extra[0], cnt[0]);
  res += add(group[1], extra[1], cnt[1]);
  cout << res << "\n";
  return 0;
}
