ball = gets.to_i
cost = 1
count = 0
chart = []
while ball > count do
    x, y = gets.split.map(&:to_i)
    a = [x, y]
    chart << a
    count += 1
end

p, q = chart[count][0] + chart[count- 1][0], chart[count][1] + chart[count- 1][1]
while count > 2 do
    cost += 1 unless p, q == chart[count][0] + chart[count- 1][0], chart[count][1] + chart[count- 1][1]
end
puts cost