#include <bits/stdc++.h>
using namespace std;
template <typename T>
void _dbg(const char* _s, T _h) {
  cerr << _s << " = " << _h << "\n";
}
template <typename T, typename... Ts>
void _dbg(const char* _s, T _h, Ts... _t) {
  int _b = 0;
  while (((_b += *_s == '(') -= *_s == ')') != 0 || *_s != ',') cerr << *_s++;
  cerr << " = " << _h << ",";
  _dbg(_s + 1, _t...);
}
const int64_t INF = static_cast<int64_t>(1e9) + 7;
const int64_t LINF = INF * INF;
const int MAXN = static_cast<int>(1e6) + 17;
void solve() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "0\n";
    return;
  }
  int ans = 0;
  vector<int> vec(n);
  int even = 0, odd = 0;
  for (int i = 0; i < n; ++i) {
    cin >> vec[i];
    if (vec[i] != 0) {
      if (vec[i] % 2 == 0) {
        ++even;
      } else {
        ++odd;
      }
      if (i > 0 && vec[i - 1] != 0 && vec[i - 1] % 2 != vec[i] % 2) {
        ++ans;
      }
    }
  }
  even = n / 2 - even;
  odd = (n + 1) / 2 - odd;
  int left = -1;
  vector<int> same_odd, same_even, beven, bodd;
  int diff = 0;
  for (int i = 0; i < n; ++i) {
    int cur = 0;
    while (i < n && vec[i] == 0) {
      ++cur;
      ++i;
    }
    if (cur > 0) {
      if (i == n) {
        if (left == -1) {
          cout << "1\n";
          return;
        }
        if (left % 2 == 0) {
          beven.push_back(cur);
        } else {
          bodd.push_back(cur);
        }
      } else {
        if (left == -1) {
          if (vec[i] % 2 == 0) {
            beven.push_back(cur);
          } else {
            bodd.push_back(cur);
          }
        } else if (vec[i] % 2 == left % 2) {
          if (vec[i] % 2 == 0) {
            same_even.push_back(cur);
          } else {
            same_odd.push_back(cur);
          }
        } else {
          ++diff;
        }
      }
    }
    if (i < n) {
      left = vec[i];
    }
  }
  sort(same_odd.begin(), same_odd.end());
  sort(same_even.begin(), same_even.end());
  for (int i = 0; i < same_odd.size(); ++i) {
    if (odd - same_odd[i] >= 0) {
      odd -= same_odd[i];
    } else {
      ans += 2;
    }
  }
  for (int i = 0; i < same_even.size(); ++i) {
    if (even - same_even[i] >= 0) {
      even -= same_even[i];
    } else {
      ans += 2;
    }
  }
  for (int i = 0; i < beven.size(); ++i) {
    if (even - beven[i] >= 0) {
      even -= beven[i];
    } else {
      ans += 1;
    }
  }
  for (int i = 0; i < bodd.size(); ++i) {
    if (odd - bodd[i] >= 0) {
      odd -= bodd[i];
    } else {
      ans += 1;
    }
  }
  ans += diff;
  cout << ans;
}
int main() {
  cin.tie(nullptr);
  cout.tie(nullptr);
  ios_base::sync_with_stdio(false);
  int q = 1;
  for (int i = 0; i < q; ++i) {
    solve();
  }
}
