gets;h={};p$<.read.split.map{|s|(h[s]^=0)?1:3}.sum/4