#include<bits/stdc++.h>
#define MAX 1000000007
#define MOD 998244353
#define ll long long int
#define fo(i,a,n) for(int i=a;i<n;i++)
#define ull unsigned long long int
#define pb push_back
#define eb emplace_back
#define in insert
#define cl clear
#define ld long double
#define mp make_pair
#define ii pair<int,int>
const ll inf = 10e16+7;
using namespace std;
typedef vector<vector<int>> vvi;

void print(int arr[], int n){
    fo(i,0,n){
        cout<<arr[i]<<" "; 
    }
    cout<<endl;
}


int main(){
 
    ios_base::sync_with_stdio(false);
    cin.tie(0);
 
    // int t;
    // cin>>t;
    // while(t--){

        

    // }

    int n;
    cin>>n;

    ll ans = 0;
    for(int i=1;i<=n;i++){
        if(n-i>=1)ans++;
    }


    cout<<ans<<endl;
 
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  cout << N-1 << endl;
}