require 'bigdecimal' require 'bigdecimal/math' N = gets.to_i sum = BigDecimal.new("0.00000000000000000000"); for i in 1..N a = gets; sum += BigDecimal.new(a) end print(sum)