#include <bits/stdc++.h>
#define ll long long
#define all(v) v.begin(),v.end()
#define sz(s) s.size()
#define PI acos(-1)
using namespace std;
void fast()
{
    std::ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}



int main()
{
    fast();

    int n; cin >> n;
    cout << n - 1 << endl;
   






    return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  if(n<=1) 
    	cout<<"0";
	else
      cout<<n-1;
  return 0;
}
  