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