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