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