#include<bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;
const double pi=acos(-1.0);
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a;}return b;}
int main(void){
    int n;
    int ans;
    cin>>n;
    if(n>2){
        ans=n-2+1;
    }
    if(n==2)ans=1;
    if(n<2)ans=0;
    
    cout<<ans<<endl;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  cout << N-1 << endl;
}


