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