#include<bits/stdc++.h>
using namespace std;
#define loi long long

//Failing at -> 1 0 0 13 0 0 16 0 0 4 0 0 7 0 19 0 0 10 0 0

pair<loi, loi> dp[100][100][100];
//    min, parity
pair<loi, loi> garland(loi ar[], loi n, loi evecnt, loi oddcnt, loi idx)
{
  //  cout << "idx = : " << idx << " evecnt : " << evecnt << " oddcnt : " << oddcnt << "\n";

    if(dp[idx][evecnt][oddcnt].first != INT_MAX)
       return dp[idx][evecnt][oddcnt];

    if(ar[idx] != 0)
    {
        if(idx == n - 1)
        {
            return (dp[idx][evecnt][oddcnt] = make_pair(0, ar[idx] & 1));
        }

        else
        {
            pair<loi, loi> p1 = garland(ar, n, evecnt, oddcnt, idx + 1);
            dp[idx][evecnt][oddcnt].first = p1.first + (((ar[idx] & 1) == p1.second) ? 0 : 1);
            dp[idx][evecnt][oddcnt].second = ar[idx] & 1;

            return dp[idx][evecnt][oddcnt];
        }
    }

    else
    {
       if(idx == n - 1)
       {
           if(evecnt > 0)
              return(dp[idx][evecnt][oddcnt] = make_pair(0, 0));

           else if(oddcnt > 0)
              return(dp[idx][evecnt][oddcnt] = make_pair(0, 1));
       }

       else
       {
           if(evecnt > 0)
           {
               pair<loi, loi> p2 = garland(ar, n, evecnt - 1, oddcnt, idx + 1);
               dp[idx][evecnt][oddcnt] = make_pair((p2.first + ((p2.second == 0) ? 0 : 1)), 0);
           }

           if(oddcnt > 0)
           {
               pair<loi, loi> p3 = garland(ar, n, evecnt, oddcnt - 1, idx + 1);
               p3.first += ((p3.second == 1) ? 0 : 1);
               p3.second = 1;

               if(dp[idx][evecnt][oddcnt].first > p3.first)
                  dp[idx][evecnt][oddcnt] = p3;
           }

           return dp[idx][evecnt][oddcnt];
       }
    }
}

int main()
{
    loi n;

    cin >> n;

    loi ar[n], freq[n + 1];

    memset(freq, 0, sizeof(freq));

    for(loi i = 0; i < n; i++)
    {
        cin >> ar[i];

        if(ar[i])
            freq[ar[i]]++;
    }

    loi evecnt = 0, oddcnt = 0;

    for(loi i = 1; i <= n; i++)
    {
        if(!freq[i]){
            if(i & 1)
              oddcnt++;

            else evecnt++;}
    }

    //cout << "Even count hai : " << evecnt << "  Odd count hai : " << oddcnt << "\n";

    for(loi i = 0; i < 100; i++)
        for(loi j = 0; j < 100; j++)
           for(loi k = 0; k < 100; k++)
              dp[i][j][k] = make_pair(INT_MAX, 5);

    loi ans = (garland(ar, n, evecnt, oddcnt, 0)).first;


    /*cout << "DP array bani hai -> \n";

    for(loi i = 0; i < 100; i++)
        for(loi j = 0; j < 100; j++)
          for(loi k = 0; k < 100; k++)
             if(dp[i][j][k].first != INT_MAX)
                cout << "idx : " << i << " evecnt : " << evecnt << " oddcnt : " << oddcnt << "  " << dp[i][j][k].first << "\n";
    */
    cout << ans << "\n";

    return 0;
}
