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 s = sum.to_s("F"); d = 0 f = false for i in 0..s.length()-1 if d == 10 break; end print(s[i]) if f d+=1 end if s[i]=='.' f = true end end for i in d..9 print("0") end print("\n")