import strutils, sequtils, math var stock: array[10, int] cnt = 0 let N = stdin.readLine.parseInt for i in 0 ..< N: let t = stdin.readLine.split.map parseInt for t in t: stock[t - 1] += 1 for i in 0 ..< stock.len: while stock[i] >= 2: stock[i] -= 2 cnt += 1 cnt += stock.sum div 4 echo cnt