a,b;main(x){for(;~scanf("%d",&x);b=1)a+=x%2?-b:b;a=!printf("%d\n",abs(a));}