#!/bin/python3 import sys def sumOfGroup(k): # Return the sum of the elements of the k'th group. x= range(1,((10**6)+1),2) t=(k*(k+1))/2 return sum(x[int(t-k):int(t)]) if __name__ == "__main__": k = int(input().strip()) answer = sumOfGroup(k) print(answer)