```
#循环遍历累加
# while True:
# try:
# N = int(input())
# sum = 0
# num = 2
# for i in range(N):
# sum += num
# num += 3
# print(sum)
# except:break
#使用等差数列公式求和
while True:
try:
n = int(input())
a1 = 2
d = 3
an = a1 + (n - 1) * d
sum = int((a1 + an) / 2 * n)
print(sum)
except:break
# while True:
# try:
# N = int(input())
# sum = 0
# num = 2
# for i in range(N):
# sum += num
# num += 3
# print(sum)
# except:break
#使用等差数列公式求和
while True:
try:
n = int(input())
a1 = 2
d = 3
an = a1 + (n - 1) * d
sum = int((a1 + an) / 2 * n)
print(sum)
except:break
```