import java.io.{BufferedReader, InputStreamReader}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val n = in.readLine().toInt

    System.out.println(
      if (n % 2 == 0) {
        n / 2 - 1
      } else {
        n / 2
      }
    )
  }
}
