require 'bigdecimal' require 'bigdecimal/util' ans = gets.to_i.times.map{gets.to_d}.inject(:+).to_s('F') ans += '.' if ans.index('.') == nil ans += '000000000000000' a, b = ans.split('.') puts "#{a}.#{b[0..9]}"