def listsum(numList):
Sum = 0
for i in numList:
Sum = Sum + i
return Sum
N = int(input())
nums_list = []
if N <= 1000 and N > 0:
for i in range(N):
x = int(input())
if x > -1 and x < 10:
nums_list. append(x)
print()
print(listsum(nums_list))
else:
print('Діапазон допустимих чисел - "1 - 1000"')