n = int(input()) mod = 10 ** 9 + 7 x = 1 y = 0 if n == 1: print(1) exit() for i in range(2, n - 1, 2): y += i * x x += (i + 1) * y if n % 2: y += (n - 1) * x print(n * y) else: print(n * x)