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