Public Class Program
  Shared Sub Main()
    Dim n As Long = Long.Parse(Console.ReadLine())
    Dim ans As Long = n \ 2
    If ans = n / 2 Then ans -= 1
    Console.WriteLine(ans.ToString())
  End Sub
End Class