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