#include <cstdio>
#include <iostream>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <set>
using namespace std;
typedef long long ll;
//const int maxn = 2e5 + 10;

int main(){
	int n;cin>>n;
	if(n%2==0) cout<<n/2-1<<endl;
	else cout<<n/2<<endl;
}