require 'matrix'

N = gets.to_i
X = Array.new(N) { Vector[*gets.split.map(&:to_i)] }
p X.size == 1 ? 1 : X.combination(2).map {|a, b|
  xx = X.clone
  i = 0
  loop {
    c = xx.pop
    xx.reject! {|x| !(b - a).independent?(x - c) }
    i += 1
    break if xx.empty?
  }
  i
}.min