#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector vll; #define for1(i,n) for (ll i=0;i<(n);i++) #define for2(i,m,n) for (ll i=(m);i<(n);i++) #define for3(i,m,n,d) for (ll i=(m);i<(n);i+=(d)) #define DEBUG 0 template void dumplist(T list) { for (auto item : list) { cout << item << " "; } cout << endl; } void solve() { ll N; cin >> N; if (N == 1) { cout << 0 << endl; return; } deque q; q.push_back(1); ll s = 2; ll l = N; ll ans = 0; while(s < l) { if (s == l) { q.push_back(l); --l; break; } else { q.push_front(l); --l; q.push_back(l); --l; if (s > l) break; } if (s == l) { q.push_back(s); ++s; break; } else { q.push_front(s); ++s; q.push_back(s); ++s; if (s > l) break; } } ll pre = q.back(); //dumplist(q); for (ll a : q) { if (pre == 0) { pre = a; } else { ans += (pre * a) + (a - pre); pre = a; } } cout << ans << endl; } int main() { do { solve(); } while (DEBUG); }