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