#include int main() { long long N; scanf("%lld", &N); if (N >= 5) printf("%lld\n", N - 3); else printf("%lld\n", N - 2); fflush(stdout); return 0; }