#include #include #include #include #include #include #include long long int sumOfGroup(long k) { // Return the sum of the elements of the k'th group. long long int a=1,sum=0,i; for(i=1;i<=((k*(k-1))/2);i++) a+=2; sum=a*k+2*((k*(k-1))/2); return sum; } int main() { long k; scanf("%ld", &k); long long int answer = sumOfGroup(k); printf("%lld\n", answer); return 0; }