function main(input) {
  var s = input[0]-0;
  var ans = 0;
  for(var i=1;i<s;i++){
    if(s-i!=i) ans++;
  }
  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').split("\n"))
