#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <queue>
#define repi(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,a) repi(i,0,a)
#define all(a) (a).begin(), (a).end()

constexpr int MAX_N = 100, INF = 1<<30;

using P = std::pair<int, int>;
using State = std::pair<int, P>;

int W, H, N;
int x[MAX_N], y[MAX_N];
int d[MAX_N][1010];
std::priority_queue<State, std::vector<State>, std::greater<State> > pque;
int ans = INF;

int main()
{
  scanf( "%d%d%d", &W, &H, &N );
  rep( i, N )
    scanf( "%d%d", x+i, y+i ), --x[i], --y[i];

  std::fill( (int*)d, (int*)(d+N), INF );

  rep( i, N )
  {
    int cost = x[i]+y[i];
    d[i][cost] = cost;
    pque.push( State( d[i][cost], P( i, cost ) ) );
  }

  while( !pque.empty() )
  {
    State st = pque.top(); pque.pop();
    int dist = st.first, v = st.second.first, cost = st.second.second;

    if( d[v][cost] < dist )
      continue;

    rep( i, N )
    {
      int ncost = std::max( 0, abs(x[i]-x[v])+abs(y[i]-y[v])-cost-1 );

      if( d[i][ncost] > d[v][cost]+ncost )
      {
        d[i][ncost] = d[v][cost]+ncost;
        pque.push( State( d[i][ncost], P( i, ncost ) ) );
      }
    }
  }

  rep( i, N ) rep( j, W+H+1 )
    ans = std::min( ans, d[i][j]+std::max(0,abs(W-1-x[i])+abs(H-1-y[i])-j) );

  printf( "%d\n", ans );
  
  return 0;
}
