package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func nextInt(sc *bufio.Scanner) int { sc.Scan() i, e := strconv.Atoi(sc.Text()) if e != nil { panic(e) } return i } func nextIntList(sc *bufio.Scanner) []int { sc.Scan() input := strings.Split(sc.Text(), " ") result := make([]int, len(input)) for i, v := range input { if j, e := strconv.Atoi(v); e != nil { panic(e) } else { result[i] = j } } return result } func absInt(num int) int { if num < 0 { return -num } return num } func main() { sc := bufio.NewScanner(os.Stdin) nextInt(sc) xList := nextIntList(sc) count := 0 for _, v := range xList { if v%2 == 0 { count += 1 } else { count -= 1 } } fmt.Println(absInt(count)) }