N=int(eval(input()))

print((N*(N+1)//2))

n=int(eval(input()))

i=0

for m in range(n+1):

	i=i+m

print(i)

N = int(eval(input()))
print((N * (N + 1) // 2))

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

-N = int(eval(input())) -print((N * (N + 1) // 2)) +n = int(eval(input())) +i = 0 +for m in range(n + 1): +    i = i + m +print(i)