#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using P = pair; constexpr int INF = 1001001001; // constexpr int mod = 1000000007; constexpr int mod = 998244353; template inline bool chmax(T& x, T y){ if(x < y){ x = y; return true; } return false; } template inline bool chmin(T& x, T y){ if(x > y){ x = y; return true; } return false; } // https://oeis.org/A110611 // a(n) = (n^3+3*n^2+5*n-6)/6 if n is even; a(n)=(n^3+3*n^2+5*n-3)/6 if n is odd. int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll n, ans; cin >> n; if(n == 1) ans = 0; else if(n % 2 == 0){ ans = (n * n * n + 3LL * n * n + 5LL * n - 6LL) / 6LL; } else{ ans = (n * n * n + 3LL * n * n + 5LL * n - 3LL) / 6LL; } cout << ans << endl; return 0; }