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