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