require 'pp'

def gets; ARGF.gets; end

class Solver

  def initialize
  end

  def main
    n = gets.chomp.to_i

    ans = (n - 1) / 2
    puts ans
  end
end

if __FILE__ == $0
  Solver.new.main
end
