#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 a = (k-1)*k + 1; long long b = 0; while(k--) { b += a; a += 2; } return b; } int main() { long long k; scanf("%lld", &k); long long answer = sumOfGroup(k); printf("%lld\n", answer); return 0; }