// No.111 あばばばば // https://yukicoder.me/problems/no/111 // #include using namespace std; int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); long long L; cin >> L; long long ans = (1 + L-3+1) * (L-1)/2 / 2; cout << ans << endl; }