res = 0

for i in range(int(eval(input()))+1):

    res += i

print(res)
n = int(eval(input()))

res = 0

for i in range(1, n+1):

    res += i

print(res)
res = 0
for i in range(int(eval(input())) + 1):
    res += i
print(res)

n = int(eval(input()))
res = 0
for i in range(1, n + 1):
    res += i
print(res)

+n = int(eval(input())) -for i in range(int(eval(input())) + 1): +for i in range(1, n + 1):