N = input() A = input() sum = 0 split_A = A.split() int_A = [int(s) for s in split_A] while len(int_A) >> 0 : sum = sum + int_A.pop() print (sum)