gets x=y=0 readlines.map{|s| a=s.chomp.split('.') x += a[0].to_i y += (s[0]=='-' ? -1 : 1) * ((a[1]==nil ? '' : a[1]) + "0000000000000000000")[0..9].to_i } M=10000000000 while y < 0 y += M x -= 1 end x += y/M y %= M puts "#{x}.#{y}"