n=gets.to_i xs=gets.split(" ").map{|e| e.to_i} ls=[0] rs=[0] s=0 n.times{|i| s+=xs[i*2]-xs[i*2+1] ls<