import java.util.Scanner; public class MyMain { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine()); if (n == 2) { System.out.println(1); sc.close(); return; } if (n == 3) { System.out.println(0); sc.close(); return; } System.out.println((n % 2 == 0) ? (n - 3) / 2 : (n - 3) / 2); sc.close(); } }