import strutils import sequtils import intsets var N = stdin.readLine.parseInt ans = 0 counter = initIntSet() for _ in 0 ..< N: var abc = stdin.readLine.split.map(parseInt) for item in abc: if item in counter: ans += 1 excl counter, item else: incl counter, item ans += counter.len div 4 echo ans