integer::N,i
  integer::X(100000)
  integer::koma=0
  read * ,N
  read *, X(1:N)
  do i=1,N
     koma = koma + ABS(MOD(X(i),2))
  end do
  print '(i0)', ABS(N-2*koma)
end program