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