#include using namespace std; unsigned long sumOfGroup(long k) { // Return the sum of the elements of the k'th group. unsigned long inicio = (k * (k-1)) + 1; unsigned long count = 0; for(int i = 0; i< k; i++) { count += inicio + (2*i); } return count; } int main() { long k; cin >> k; unsigned long answer = sumOfGroup(k); cout << answer << endl; return 0; }