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