#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define all(x) x.begin() , x.end() #define fi first #define se second #define pb push_back #define umax( x , y ) x = max( x , (y) ) #define umin( x , y ) x = min( x , (y) ) #define For( i , a ) for(int i=1;i<=a;i++) #define ort (b+s)/2 #define y2 asrwjaelkf #define y1 asseopirwjaelkf #define set multiset using namespace std; inline int read() { int res = 0 ;int neg ; while(true){char ch = getchar();if(ch>='0' && ch<='9' || ch=='-'){if(ch=='-') neg = -1;else neg = 1 , res = ch-'0';break;} } while(true){char ch = getchar();if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';else break;} return res*neg; } typedef long long Lint; typedef double db; typedef pair ii; typedef pair dd; typedef pair di; typedef pair iii; typedef pair i4; const int maxn = 1000020; const int maxm = 10000020; const int MOd = 1e9 + 7; const int K = 300; Lint a, b; int main() { //freopen("asd.in","r",stdin); //freopen("out.txt","w",stdout); scanf("%lld",&a); Lint ans = a; Lint b = a*(a-1)/2; ans += ( a * b + a*(a-1)/2 ) * 2; cout << ans << endl; return 0; }