#!/bin/python3 import sys def sumOfGroup(k): # Return the sum of the elements of the k'th group. s=1+k*(k-1) s=k*(s+k-1) print(s) if __name__ == "__main__": k = int(input().strip()) sumOfGroup(k)