#!/bin/python3 k=int(input()) b,x=[],1 for i in range(1,k+1): a=[] for j in range(i): a.append(x) x+=2 b.append(a) print(sum(b[k-1]))