n = gets.to_i
a = n.times.map{gets.split.map(&:to_i)}.sort_by{|a,b| [a,b]}
x1 = 0
y1 = 0
count = 0
(1...n).map do |i|
  x2 = a[i][0] - a[i-1][0]
  y2 = a[i][1] - a[i-1][1]
  if x1 != x2 && y1 != y2
    count += 1
    x1 = x2
    y1 = y2
  end
end

puts count