n=gets.to_i a=[] n.times{ a+=[gets.chomp] } a.sort! ml=0;m=1 a.inject{|s,e| m+=1 m=1 if s!=e ml = m if ml