object Main extends App {
  import scala.collection.mutable
  import scala.io.StdIn._


  val Array(w, h, n) = readLine.trim.split(' ').map(_.toInt)
  val coordinates = Array.tabulate(n){_ ⇒
    val Array(x, y) = readLine.trim.split(' ').map(_.toInt)
    Coordinate(x, y)
  }
  val minCost = Array.tabulate(n){_ ⇒ Array.tabulate(w + h + 1){r ⇒ w + h}}
  val queue = mutable.PriorityQueue()(Ordering.by[(Int, Int, Int), Int](_._3).reverse)
  for ((c, i) ← coordinates.zipWithIndex){
    minCost(i)(c.x - 1 + c.y - 1) = c.x - 1 + c.y - 1
    queue.enqueue((i, c.x - 1 + c.y - 1, c.x - 1 + c.y - 1))
  }
  while(queue.nonEmpty){
    val (top, r, cost) = queue.dequeue()
    if (minCost(top)(r) == cost){
      for ((c, i) ← coordinates.zipWithIndex if top != i){
        val nr: Int = math.max(c.manhattanDistance(coordinates(top)) - r - 1, 0)
        if (nr + cost < minCost(i)(nr)){
          minCost(i)(nr) = nr + cost
          queue.enqueue((i, nr, nr + cost))
        }
      }
    }
  }
  println(
    minCost.zip(coordinates).map{
      case (l, c) ⇒
        val r = Coordinate(w, h).manhattanDistance(c)
        l.indices.map(nr ⇒ if (nr >= r) l(nr) else l(nr) + r - nr).min
    }.min
  )

  case class Coordinate(x: Int, y: Int){
    def manhattanDistance(that: Coordinate): Int = math.abs(x - that.x) + math.abs(y - that.y)
  }
  implicit class Scope[T](val value: T) extends AnyVal {
    @inline def also(@inline func: T ⇒ Unit): T = {
      func(value)
      value
    }
    @inline def let[A](@inline func: T ⇒ A): A = func(value)
  }
}
