#include using namespace std; using lint = long long; template using V = vector; template using VV = V< V >; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); lint n; cin >> n; if (n & 1) { cout << (n * n * n + 3 * n * n + 5 * n - 3) / 6 << '\n'; } else { cout << (n * n * n + 3 * n * n + 5 * n - 6) / 6 << '\n'; } }