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