等差数列 2,5,8,11,14。。。。
while True:
line = input().strip()
if not line:
break
line2 = int(line)
num = 2
sumnum = 0
while line2 > 0:
sumnum = num + sumnum
num += 3
line2 -= 1
print (sumnum)