n = int(input())

sum = n*2 + n*(n-1)*3/2  # 等差数列和公式

print(int(sum))