while 1:print sum([_**2 for _ in range(1+input())])