n=gets.to_i a=$<.map{|e|eval e.sub' ','-30000*'} m=a.max