package main import ( "bufio" "fmt" "os" "strconv" ) func nextInt(sc *bufio.Scanner) int { sc.Scan() i, e := strconv.Atoi(sc.Text()) if e != nil { panic(e) } return i } func absInt(num int) int { if num < 0 { return -num } return num } func main() { sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) n := nextInt(sc) count := 0 for i := 0; i < n; i++ { if nextInt(sc)%2 == 0 { count += 1 } else { count -= 1 } } fmt.Println(absInt(count)) }