#include using namespace std; using ll = long long; signed main() { ll N; cin >> N; if (N == 1) { cout << 0 << endl; return 0; } ll num = 1; vector A, B; for (ll i = 0; i < N; i++) { if (i % 2 == 0) { if (i % 4 == 0) { A.push_back(num); } else { B.push_back(num); } num = N - num + 1; } else { if (i % 4 == 1) { B.push_back(num); } else { A.push_back(num); } num = N - num + 2; } } reverse(B.begin(), B.end()); A.insert(A.end(), B.begin(), B.end()); ll res = 0; for (ll i = 0; i < N; i++) { res += A[i] * A[(i + 1) % N]; } cout << res << endl; }