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