def get_int
  gets.chop.to_i
end

def get_ints
  gets.chop.split.map(&:to_i)
end

def get_double
  gets.chop.to_f
end

def get_str
  gets.chop
end

def get_strs
  gets.chop.split
end

def main
  n = get_int
  if n % 2 == 0
    puts (n/2 -1)
  else
    puts (n / 2)
  end
end

if __FILE__ == $0
  main
end

