      PROGRAM sumOfTwoIntegers
      IMPLICIT NONE
      integer :: N
      integer :: ans
      
      read*,N
      
      if( mod(N,2)==1 )THEN
        ans = (N-1) / 2
      else
        ans = N/2 -1
      end if
      
      print*,ans
      
      
      
      
      
      
      END PROGRAM