n = int(input("Integer n: ")) result = sum((-1)**(k+1) * k**2 for k in range(1, n + 1)) print(result)