import sequtils, strutils, tables let n = parseInt readLine stdin abcs = concat n.newSeqWith stdin.readLine.split.map parseInt var cntT = abcs.toCountTable cnt = [0, 0] for i in 1 .. 10: cnt = [cnt[0] + cntT[i] div 2, cnt[1] + cntT[i] mod 2] echo cnt[0] + cnt[1] mod 4