while True: try: n = int(input()) ls = [] for i in range(n): ls.append(2 + 3 * i) print(sum(ls)) except: break