package main import ( "fmt" ) func main() { var n int fmt.Scan(&n) card := make([]int, 11) var c, p int for i := 0; i < n; i++ { for j := 0; j < 3; j++ { fmt.Scan(&c) if card[c] == 0 { card[c] += 1 } else { card[c] = 0 p += 1 } } } count := 0 for i := 0; i < 11; i++ { count += 1 * card[i] } fmt.Println(p + count/4) }