n = gets.to_i a = gets.split.map(&:to_i) num = 0 out = 0 for i in 1..n out += a[num] num += 1 end puts out