/* ---------- STL Libraries ---------- */ // IO library #include #include #include #include #include // algorithm library #include #include #include #include #include // container library #include #include #include #include #include #include #include #include #include #include #include /* ---------- Namespace ---------- */ using namespace std; /* ---------- Type ---------- */ using ll = long long; #define int ll #define P pair /* ---------- Constants */ const double PI = 3.141592653589793238462643383279; const ll MOD = 1e9 + 7; const int INF = 1LL << 55; /* v-v-v-v-v-v-v-v-v Main Part v-v-v-v-v-v-v-v-v */ signed main() { int N; cin >> N; if (N == 1) { cout << 0 << endl; return 0; } vector visited(N + 1, false); vector before; vector after; for (int i = 1; i < N - i && i + 1 < N - i; i += 2) { before.push_back(i); before.push_back(N - i); visited[i] = true; visited[N - i] = true; after.push_back(N - i + 1); after.push_back(i + 1); visited[N - i + 1] = true; visited[N - i] = true; } reverse(after.begin(), after.end()); for (int i = 1; i <= N; i++) if (!visited[i]) before.push_back(i); for (int a : after) before.push_back(a); int ret = before[0] * before[before.size() - 1]; for (int i = 0; i < before.size() - 1; i++) ret += before[i] * before[i+1]; cout << ret << endl; return 0; }