#include #include #include #include #include using namespace std; typedef long long ll; //定義場所// ll i, j, k, l, m, n; ll N; //////////// int main() { cin >> N; ll ans = 0; if (N == 1) { cout << 0; } else { ll A = 1; ll B = N + (N - 1); ans += A * B; B--; A++; while (A <= (N / 2)) { ans += A * B; if (N%2==0&&A == (N / 2) - 1) { B--; } else { B -= 2; } A++; } if (N % 2 == 1) { ans += A * (A + 1); } cout << ans; } }