#pragma GCC optimize("Ofast") 
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define sz(a) (int)(a.size())
#define all(a) a.begin(),a.end()
#define lb lower_bound
#define ub upper_bound
#define owo ios_base::sync_with_stdio(0);cin.tie(0);
#define MOD (ll)(1e9+7)
#define INF (ll)(1e18)
#define debug(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define time__(d) for(long blockTime = 0; (blockTime == 0 ? (blockTime=clock()) != 0 : false);\
debug("%s time : %.4fs\n", d, (double)(clock() - blockTime) / CLOCKS_PER_SEC))
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> PII;
typedef pair<int,int> pii;
typedef vector<vector<int>> vii;
typedef vector<vector<ll>> VII;
ll gcd(ll a,ll b){if(!b)return a;else return gcd(b,a%b);}
int main()
{
  int n;cin>>n;
  cout<<n-1;
	
}
//-------------------------//
 
#include<bits/stdc++.h>

using namespace std;
 
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define srt(v) sort(all(v))
#define rsrt(v) sort(v.rbegin(), v.rend())
#define sp " "
#define nl "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define fst ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

 
const int N=1e9+7;
typedef long long ll;
typedef long double ld;
 
 
 
ll power(ll x, ll y){
    ll res = 1;
    if (x == 0) return 0;
    while (y > 0){
        if (y & 1)
            res = (res*x) % N;
        y = y>>1; 
        x = (x*x) % N;
    }
    return res;
}
 
/*
int Seive[1000001]={0};
void seive(ll n)
{
    Seive[1]={1};
    for(int i=2;i*i<=n;i++){
        if(Seive[i]){continue;}
        for(int j=2*i;j<=n;j+=i){
            Seive[j]=1;
        }
    }

}
*/


void solve(){

ll n;
cin>>n;

if(n&1){
    cout<<2*(n-1)/2;
}else{
    cout<<2*n/2 - 1;
}

cout<<nl;

}




 
 
 


 

int main(){
fst
//cout<<fixed<<setprecision(15);

 

int t=1;
//cin>>t;
while(t--){

    solve();

}


return 0;
 
}