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

typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;

int main() {
    int n;
    cin >> n;

    cout << n - 1;
}
#include<iostream>
#include<bits/stdc++.h>
#define forf(i,start,n,increment) for(int i = start;i<n;i+=increment)
#define all(i) i.begin(),i.end()
#define traverse(container,it) for(typeof(container.begin()) it = container.begin();it != container.end();it++)
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin>>n;
   
    
        if(n%2 == 0)
        cout<<(n/2-1)*2+1;
        else
        cout<<(n/2)*2;
    
    return 0;
}