# Arup Guha
# 3/28/2025
# Solution to 2025 COP 4516 Team Contest 2 Problem: The n Days of Christmas

LIMIT = 1000000

# Pre-compute all answers.
res = [0]
for i in range(1, LIMIT+1):
    res.append(res[-1] + i*(i+1)//2)

# Process input.
n = int(input())
loop = 1
while n != 0:
    print(res[n])
    n = int(input())
    loop += 1
    
