a = Array.new(gets.to_i) a = gets.split(" ") t = 0 a.each do |v| t += v.to_i end puts t