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