#等差数列前n项和公式:s=(2*a1+(n-1)*p)*n/2
#其中p为等差,a1为首项,n为项数

a1=2
p=3
n=int(input())
print(int((2*a1+(n-1)*p)*n/2))