image.png

    1. #include <iostream>
    2. using namespace std;
    3. int main(){
    4. int N = 0;
    5. while(cin>>N){
    6. cout<<((2+2+(N-1)*3)*N/2)<<endl;
    7. }
    8. }