'use strict'; const main = (input) => { const [N] = input.trim(); let num = Number(N); let count = 0; num -= 3; while (true) { if (num % 2 === 0) { count++; num -= 2; if (num === 0) { break; } else { break; } } } console.log(count); }; main(require('fs').readFileSync('/dev/stdin', 'utf8'));