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