#!/bin/python3 import sys def sumOfGroup(k): # Return the sum of the elements of the k'th group. n=k-1 s,c=0,0 n=(n*(n+1))/2; f=2*int(n) while c!=k: if f%2 !=0: s=s+f c+=1 f+=1 return s if __name__ == "__main__": k = int(input().strip()) answer = sumOfGroup(k) print(answer)