#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef long double ld; typedef pair P; constexpr int INF = 2e9; int main() { ll n; cin >> n; ll res = 0; if (n == 1) { cout << res << endl; return 0; } if (n % 2 == 0) { res = n * n * n + 3 * n*n + 5*n - 6; res /= 6; } else { res = n * n * n + 3 * n*n + 5*n - 3; res /= 6; } cout << res << endl; return 0; }