N = gets.to_i
pos = readlines.map {|a| a.split.map(&:to_i) }
if pos.size == 1
  puts 1
else
  pq = pos.each_cons(2).map {|a,b| [b[0] - a[0], b[1] - a[1]] }
          .group_by(&:itself).delete_if {|k,v| k[0] == 0 && k[1] == 0 }
  puts N - (pq.empty? ? 0 : pq.max_by {|k,v| v.size }[1].size)
end