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