while True:
    
    try:
        n = int(input())
        result = 0
        next_num = 2
        for i in range(1, n + 1):
            result += next_num
            next_num += 3
        print(result)
        
        
    except:
        break