#include <bits/stdc++.h>
using namespace std;
int main(){
// #ifndef TESTING
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// #endif
int nPillars;
cin >> nPillars;
if(nPillars < 4){
cout << 1 << endl;
} else {
cout << nPillars - 2 << endl;
}
return 0;
}