function main(input){
    var a = parseInt(input.split('\n'), 10);
	
  	if (a<=2) return console.log(0);
  	return console.log(parseInt((a-1)/2, 10));

}
main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));