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