#include <bits/stdc++.h>
using namespace std;
const long double pi = 2 * acos(0.0);
long long binary_search(long long dp[], long long n, long long p) {
  long long l, r, mid;
  l = 0;
  r = n - 1;
  sort(dp, dp + n);
  while (l <= r && l >= 0 && l <= n - 1 && r >= 0 && r <= n - 1) {
    mid = (l + r) / 2;
    if (dp[mid] >= p) {
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  return l;
}
struct s {
  int length, parity;
};
bool compare(s s1, s s2) { return (s1.length < s2.length); }
int main() {
  int n, com = 0, odd_count = 0, even_count = 0, len, l, k, j, i, count0 = 0;
  vector<s> v;
  cin >> n;
  if (n == 1) {
    cout << 0 << "\n";
    return 0;
  }
  int A[n];
  for (i = 0; i < n; ++i) {
    cin >> A[i];
    if (A[i] % 2 == 1)
      odd_count++;
    else if (A[i] % 2 == 0 && A[i] != 0)
      even_count++;
    if (A[i] == 0) ++count0;
  }
  if (count0 == n) {
    cout << 1 << "\n";
    return 0;
  }
  if (n % 2 == 0) {
    odd_count = n / 2 - odd_count;
    even_count = n / 2 - even_count;
  } else {
    odd_count = (n / 2 + 1) - odd_count;
    even_count = (n / 2) - even_count;
  }
  vector<int> one;
  int pref = -1, suf = -1, pref_len = 0, suf_len = 0;
  i = 0;
  if (A[0] == 0) {
    while (A[i] == 0 && i < n) {
      ++i;
      ++pref_len;
    }
    if (i < n) pref = A[i] % 2;
  }
  j = n - 1;
  if (A[n - 1] == 0) {
    j = n - 1;
    while (A[j] == 0 && j >= 0) {
      --j;
      ++suf_len;
    }
    if (j >= 0) suf = A[j] % 2;
  }
  k = i;
  while (k <= j - 1) {
    if (A[k + 1] == 0) {
      l = A[k] % 2;
      k = k + 1;
      len = 0;
      while (A[k] == 0) {
        ++k;
        ++len;
      }
      if (A[k] % 2 == l) {
        if (l == 1) {
          s s1;
          s1.length = len;
          s1.parity = l;
          v.push_back(s1);
        } else {
          s s1;
          s1.length = len;
          s1.parity = l;
          v.push_back(s1);
        }
      } else
        com += 1;
    } else {
      if (A[k + 1] % 2 != A[k] % 2) com += 1;
      ++k;
    }
  }
  sort(v.begin(), v.end(), compare);
  for (i = 0; i < v.size(); ++i) {
    if (v[i].parity == 1) {
      len = v[i].length;
      if (odd_count >= len) {
        odd_count -= len;
      } else {
        if (pref == 1 || suf == 1) {
          if (pref == 1 && suf == 1) {
            if (odd_count >= pref_len + suf_len) {
              odd_count -= (pref_len + suf_len);
              A[0] = 10;
              A[n - 1] = 10;
            } else {
              if (pref_len > suf_len) {
                if (odd_count >= suf_len) {
                  odd_count -= (suf_len);
                  A[n - 1] = 10;
                }
              } else {
                if (odd_count >= pref_len) {
                  odd_count -= (pref_len);
                  A[0] = 10;
                }
              }
            }
          } else if (pref == 1) {
            if (odd_count >= pref_len) {
              odd_count -= (pref_len);
              A[0] = 10;
            }
          } else if (suf == 1) {
            if (odd_count >= suf_len) {
              odd_count -= (suf_len);
              A[n - 1] = 10;
            }
          }
        }
        even_count -= (len - odd_count);
        odd_count = 0;
        com += 2;
      }
    } else {
      len = v[i].length;
      if (even_count >= len) {
        even_count -= len;
      } else {
        if (pref == 0 || suf == 0) {
          if (pref == 0 && suf == 0) {
            if (even_count >= pref_len + suf_len) {
              even_count -= (pref_len + suf_len);
              A[0] = 10;
              A[n - 1] = 10;
            } else {
              if (pref_len > suf_len) {
                if (even_count >= suf_len) {
                  even_count -= (suf_len);
                  A[n - 1] = 10;
                }
              } else {
                if (even_count >= pref_len) {
                  even_count -= (pref_len);
                  A[0] = 10;
                }
              }
            }
          } else if (pref == 0) {
            if (even_count >= pref_len) {
              even_count -= (pref_len);
              A[0] = 10;
            }
          } else if (suf == 1) {
            if (even_count >= suf_len) {
              even_count -= (suf_len);
              A[n - 1] = 10;
            }
          }
        }
        odd_count -= (len - even_count);
        even_count = 0;
        com += 2;
      }
    }
  }
  int com1 = com, odd_count1 = odd_count, even_count1 = even_count;
  if (A[0] == 0) {
    len = pref_len;
    if (pref == 1) {
      if (odd_count >= len) {
        odd_count -= len;
      } else {
        even_count -= (len - odd_count);
        odd_count = 0;
        com += 1;
      }
    } else {
      if (even_count >= len) {
        even_count -= len;
      } else {
        odd_count -= (len - even_count);
        even_count = 0;
        com += 1;
      }
    }
  }
  if (A[n - 1] == 0) {
    len = suf_len;
    if (suf == 1) {
      if (odd_count >= len) {
        odd_count -= len;
      } else {
        even_count -= (len - odd_count);
        odd_count = 0;
        com += 1;
      }
    } else {
      if (even_count >= len) {
        even_count -= len;
      } else {
        odd_count -= (len - even_count);
        even_count = 0;
        com += 1;
      }
    }
  }
  odd_count = odd_count1;
  even_count = even_count1;
  if (A[n - 1] == 0) {
    len = suf_len;
    if (suf == 1) {
      if (odd_count >= len) {
        odd_count -= len;
      } else {
        even_count -= (len - odd_count);
        odd_count = 0;
        com1 += 1;
      }
    } else {
      if (even_count >= len) {
        even_count -= len;
      } else {
        odd_count -= (len - even_count);
        even_count = 0;
        com1 += 1;
      }
    }
  }
  if (A[0] == 0) {
    len = pref_len;
    if (pref == 1) {
      if (odd_count >= len) {
        odd_count -= len;
      } else {
        even_count -= (len - odd_count);
        odd_count = 0;
        com1 += 1;
      }
    } else {
      if (even_count >= len) {
        even_count -= len;
      } else {
        odd_count -= (len - even_count);
        even_count = 0;
        com1 += 1;
      }
    }
  }
  cout << min(com, com1) << "\n";
}
