import sys def sumOfGroup(k): odd_number=-1 start=1 empty_list=[] while True: for i in range(0,start): odd_number+=2 empty_list.append(odd_number) if len(empty_list)==k: total=0 for j in empty_list: total+=j return total start+=1 empty_list.clear() # Return the sum of the elements of the k'th group. if __name__ == "__main__": k = int(input().strip()) answer = sumOfGroup(k) print(answer)