#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 1) {
    cout << "0";
    return 0;
  }
  vector<int> gapioe;
  vector<int> gape;
  vector<int> gapo;
  vector<int> gapoe;
  vector<int> gapoo;
  int i;
  int gap = 0;
  for (i = 0; i < n; i++) {
    if (a[i] != 0) {
      break;
    } else {
      gap++;
    }
  }
  if (i == n) {
    cout << "1";
    return 0;
  }
  if (a[i] % 2 == 0) {
    gapoe.push_back(gap);
  } else {
    gapoo.push_back(gap);
  }
  for (; i < n; i++) {
    if (a[i] != 0) {
      gap = 0;
      int j;
      for (j = i + 1; j < n; j++) {
        if (a[j] != 0) {
          break;
        } else {
          gap++;
        }
      }
      if (j == n) {
        if (a[i] % 2 == 0) {
          gapoe.push_back(gap);
        } else {
          gapoo.push_back(gap);
        }
        continue;
      }
      if (a[j] % 2 == 1 && a[i] % 2 == 1) {
        gapo.push_back(gap);
      } else if (a[j] % 2 == 0 && a[i] % 2 == 0) {
        gape.push_back(gap);
      } else {
        gapioe.push_back(gap);
      }
    }
  }
  int odd, even;
  if (n % 2 == 1) {
    odd = n / 2 + 1;
    even = n / 2;
  } else {
    odd = n / 2;
    even = n / 2;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] != 0) {
      if (a[i] % 2 == 0) {
        even--;
      } else {
        odd--;
      }
    }
  }
  long long ans = 0;
  sort(gapo.begin(), gapo.end());
  sort(gape.begin(), gape.end());
  if (odd < even) {
    for (int i = 0; i < gapo.size(); i++) {
      if (gapo[i] <= odd) {
        odd = odd - gapo[i];
      } else {
        gapo[i] = gapo[i] - odd;
        even = even - gapo[i];
        ans += 2;
      }
    }
    for (int i = 0; i < gape.size(); i++) {
      if (gape[i] <= even) {
        even = even - gape[i];
      } else {
        gape[i] = gape[i] - even;
        even = even - gape[i];
        ans += 2;
      }
    }
  } else {
    for (int i = 0; i < gape.size(); i++) {
      if (gape[i] <= even) {
        even = even - gape[i];
      } else {
        gape[i] = gape[i] - even;
        even = even - gape[i];
        ans += 2;
      }
    }
    for (int i = 0; i < gapo.size(); i++) {
      if (gapo[i] <= odd) {
        odd = odd - gapo[i];
      } else {
        gapo[i] = gapo[i] - odd;
        even = even - gapo[i];
        ans += 2;
      }
    }
  }
  if (odd < even) {
    for (int i = 0; i < gapoo.size(); i++) {
      if (gapoo[i] <= odd) {
        odd = odd - gapoo[i];
      } else {
        gapoo[i] = gapoo[i] - odd;
        even = even - gapoo[i];
        ans += 1;
      }
    }
    for (int i = 0; i < gapoe.size(); i++) {
      if (gapoe[i] <= even) {
        even = even - gapoe[i];
      } else {
        gapoe[i] = gapoe[i] - even;
        odd = odd - gapoe[i];
        ans += 1;
      }
    }
  } else {
    for (int i = 0; i < gapoe.size(); i++) {
      if (gapoe[i] <= even) {
        even = even - gapoe[i];
      } else {
        gapoe[i] = gapoe[i] - even;
        odd = odd - gapoe[i];
        ans += 1;
      }
    }
    for (int i = 0; i < gapoo.size(); i++) {
      if (gapoo[i] <= odd) {
        odd = odd - gapoo[i];
      } else {
        gapoo[i] = gapoo[i] - odd;
        even = even - gapoo[i];
        ans += 1;
      }
    }
  }
  ans += gapioe.size();
  cout << ans;
  return 0;
}
