n=int(input())
print(sum([2+3*i if n >1 else 2 for i in range(n)]))