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