n = gets.chomp.to_i
x = []
y = []
n.times do |i|
    x[i], y[i] = gets.split.map(&:to_i)
end
pq = []
n.times do |i|
    next if i == 0
    # pq.push({x: x[i] - x[i-1], y:y[i] - y[i-1]})
    pq.push([x[i] - x[i-1], y[i] - y[i-1]])
end

pq = pq.group_by(&:itself)
m = 0
pq.each_value{|v|
    m = [v.count, m].max
}
puts n-m