#include #define DEBUG false using namespace std; int main() { long long k; cin >> k; long long startTerm = ((k-1) * ((k-1) + 1 ) / 2) + 1; if(DEBUG) cout << "startTerm: " << startTerm << endl; long long startValue = 2 * (startTerm) - 1; if(DEBUG) cout << "startValue: " << startValue << endl; long long result = k * (startValue + k - 1); cout << result; return 0; }