object Main {

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)

    // p, q の重複の数が一番多い時、その重複の個数だけコスト0になる
    val N = sc.nextInt()
    val P: IndexedSeq[(Long, Long)] =
      (0 until N) map { i =>
        val x, y = sc.nextLong()
        (x, y)
      }

    val (_, cost0) = P.sliding(2).map { slide =>
      val bp = slide(0)
      val np = slide(1)
      val (bx, by) = bp
      val (nx, ny) = np
      (nx - bx, ny - by)
    }. toList. groupBy(identity). mapValues(_.size). maxBy(_._2)

    println(N - cost0)
  }

}
