#include <iostream> using namespace std; int main() { int n1; while(cin>>n1) { cout<<n1*(3*n1+1)/2<<endl; } return 0; } // 64 位输出请用 printf("%lld")