hs={} gets x=gets.split.map{|e| e.to_i} x.each{|e| hs[e]=1 } hs2={} hs2[0]=1 hs.keys.each{|e| hs3={} hs2.keys.each{|e2| hs3[e^e2]=0 } hs2.update(hs3) } puts hs2.size