Vadim loves decorating the Christmas tree, so he got a beautiful garland as a present. It consists of n light bulbs in a single row. Each bulb has a number from 1 to n (in arbitrary order), such that all the numbers are distinct. While Vadim was solving problems, his home Carp removed some light bulbs from the garland. Now Vadim wants to put them back on.

<image>

Vadim wants to put all bulb back on the garland. Vadim defines complexity of a garland to be the number of pairs of adjacent bulbs with numbers with different parity (remainder of the division by 2). For example, the complexity of 1 4 2 3 5 is 2 and the complexity of 1 3 5 7 6 4 2 is 1.

No one likes complexity, so Vadim wants to minimize the number of such pairs. Find the way to put all bulbs back on the garland, such that the complexity is as small as possible.

Input

The first line contains a single integer n (1 ≤ n ≤ 100) — the number of light bulbs on the garland.

The second line contains n integers p_1,\ p_2,\ …,\ p_n (0 ≤ p_i ≤ n) — the number on the i-th bulb, or 0 if it was removed.

Output

Output a single number — the minimum complexity of the garland.

Examples

Input


5
0 5 0 2 3


Output


2


Input


7
1 0 0 5 0 0 2


Output


1

Note

In the first example, one should place light bulbs as 1 5 4 2 3. In that case, the complexity would be equal to 2, because only (5, 4) and (2, 3) are the pairs of adjacent bulbs that have different parity.

In the second case, one of the correct answers is 1 7 3 5 6 4 2. 
import java.util.*;
import java.io.*;
public class Main {
    static class Scan {
        private byte[] buf=new byte[1024];
        private int index;
        private InputStream in;
        private int total;
        public Scan()
        {
            in=System.in;
        }
        public int scan()throws IOException
        {
            if(total<0)
            throw new InputMismatchException();
            if(index>=total)
            {
                index=0;
                total=in.read(buf);
                if(total<=0)
                return -1;
            }
            return buf[index++];
        }
        public int scanInt()throws IOException
        {
            int integer=0;
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            int neg=1;
            if(n=='-')
            {
                neg=-1;
                n=scan();
            }
            while(!isWhiteSpace(n))
            {
                if(n>='0'&&n<='9')
                {
                    integer*=10;
                    integer+=n-'0';
                    n=scan();
                }
                else throw new InputMismatchException();
            }
            return neg*integer;
        }
        public double scanDouble()throws IOException
        {
            double doub=0;
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            int neg=1;
            if(n=='-')
            {
                neg=-1;
                n=scan();
            }
            while(!isWhiteSpace(n)&&n!='.')
            {
                if(n>='0'&&n<='9')
                {
                    doub*=10;
                    doub+=n-'0';
                    n=scan();
                }
                else throw new InputMismatchException();
            }
            if(n=='.')
            {
                n=scan();
                double temp=1;
                while(!isWhiteSpace(n))
                {
                    if(n>='0'&&n<='9')
                    {
                        temp/=10;
                        doub+=(n-'0')*temp;
                        n=scan();
                    }
                    else throw new InputMismatchException();
                }
            }
            return doub*neg;
        }
        public String scanString()throws IOException
        {
            StringBuilder sb=new StringBuilder();
            int n=scan();
            while(isWhiteSpace(n))
            n=scan();
            while(!isWhiteSpace(n))
            {
                sb.append((char)n);
                n=scan();
            }
            return sb.toString();
        }
        private boolean isWhiteSpace(int n)
        {
            if(n==' '||n=='\n'||n=='\r'||n=='\t'||n==-1)
            return true;
            return false;
        }
    }
    static int n,arr[],dp[][][][];
    public static void main(String args[]) throws IOException {
        Scan input=new Scan();
        n=input.scanInt();
        arr=new int[n];
        int even=0,odd=0;
        ArrayList<Integer> arrli=new ArrayList<>();
        
        for(int i=1;i<=n;i++) {
            arrli.add(i);
        }
        for(int i=0;i<n;i++) {
            arr[i]=input.scanInt();
            if(arr[i]!=0) {
                arrli.remove(new Integer(arr[i]));
            }
        }
        for(int i=0;i<arrli.size();i++) {
            if(arrli.get(i)%2==0) {
                even++;
            }
            else {
                odd++;
            }
        }
        int tmp=0;
        for(int i=0;i<n-1;i++) {
            if(arr[i]==0 || arr[i+1]==0) {
                continue;
            }
            if(arr[i]%2!=arr[i+1]%2) {
                tmp++;
            }
        }
        dp=new int[101][100][100][3];
        for(int i=0;i<100;i++) {
            for(int j=0;j<100;j++) {
                for(int k=0;k<100;k++) {
                    for(int l=0;l<3;l++) {
                        dp[i][j][k][l]=-1;
                    }
                }
            }
        }
        System.out.println(tmp+solve(0,even,odd,0));
    }
    public static int solve(int indx,int even,int odd,int prev) {
        if(indx==n) {
            return 0;
        }
        if(even==0 && odd==0) {
            return 0;
        }
        while(arr[indx]!=0) {
            prev=0;
            indx++;
        }
        if(dp[indx][even][odd][prev]!=-1) {
            return dp[indx][even][odd][prev];
        }
        int min=Integer.MAX_VALUE;
        if(even!=0) {
            arr[indx]=2;
            int tmp=solve(indx+1,even-1,odd,2);
            arr[indx]=0;
            if(indx!=0 && arr[indx-1]%2!=0) {
                tmp++;
            }
            if(indx!=n-1 && arr[indx+1]!=0 && arr[indx+1]%2!=0) {
                tmp++;
            }
            min=Math.min(min,tmp);
        }
        if(odd!=0) {
            arr[indx]=1;
            int tmp=solve(indx+1,even,odd-1,1);
            arr[indx]=0;
            if(indx!=0 && arr[indx-1]%2==0) {
                tmp++;
            }
            if(indx!=n-1 && arr[indx+1]!=0 && arr[indx+1]%2==0) {
                tmp++;
            }
            min=Math.min(min,tmp);
        }
        dp[indx][even][odd][prev]=min;
        return min;
    }
}
