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 = chart[count-1][0] + chart[count- 2][0]
q = chart[count-1][1] + chart[count- 2][1]
while count > 2 do
    cost += 1 unless p == chart[count-1][0] + chart[count- 2][0] && q = chart[count-1][1] + chart[count- 2][1]
    count -= 1
end
puts cost