/****************************************** * AUTHOR: CHIRAG AGARWAL * * INSTITUITION: BITS PILANI, PILANI * ******************************************/ #include using namespace std; typedef long long LL; typedef long double LD; int main() { int k; scanf("%d",&k); LL cur=((k*1ll*(k-1))/2); cur=2*cur-1; LL ans=0; for(int i=1;i<=k;i++) { ans+=(cur+2*i); } printf("%lld\n",ans); return 0; }