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