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