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