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