#include using namespace std; long get_ith_odd_int(long pos) { long result = 2*pos + 1; return result; } long sumOfGroup(int k) { // Return the sum of the elements of the k'th group. long idx = 1; long result = 0; for (int i = 1; i < k; i++) { idx += i; } //cout << "index " << idx << endl; for (int j = 0; j < k; j++) { //cout << "ith odd " << get_ith_odd_int(j+idx-1) << endl; result += get_ith_odd_int(j+idx-1); } return result; } int main() { int k; cin >> k; long answer = sumOfGroup(k); cout << answer << endl; return 0; }