#include <queue>
#include <iostream>
#include <algorithm>
using namespace std;
const int inf = 1012345678;
struct state { int pos, cost; };
bool operator<(const state& s1, const state& s2) { return s1.cost > s2.cost; }
int H, W, N, x[109], y[109], dist[109][1009];
int main() {
	cin >> H >> W >> N;
	for (int i = 0; i < N; i++) cin >> x[i] >> y[i];
	for (int i = 0; i < N; i++) {
		for (int j = 0; j <= H + W - 2; j++) {
			dist[i][j] = inf;
		}
	}
	priority_queue<state> que;
	for (int i = 0; i < N; i++) {
		int d = x[i] + y[i] - 2;
		dist[i][d] = d;
		que.push(state{ i + d * N, d });
	}
	while (!que.empty()) {
		int u = que.top().pos; que.pop();
		int pos = u % N, cur = u / N;
		if (cur < H + W - 2 && dist[pos][cur + 1] > dist[pos][cur] + 1) {
			dist[pos][cur + 1] = dist[pos][cur] + 1;
			que.push(state{ u + N, dist[pos][cur + 1] });
		}
		for (int i = 0; i < N; i++) {
			int d = abs(x[i] - x[pos]) + abs(y[i] - y[pos]);
			int cc = max(d - cur - 1, 0);
			if (dist[i][cc] > dist[pos][cur] + cc) {
				dist[i][cc] = dist[pos][cur] + cc;
				que.push(state{ i + cc * N, dist[i][cc] });
			}
		}
	}
	int ret = inf;
	for (int i = 0; i < N; i++) {
		int d = W - x[i] + H - y[i];
		for (int j = d; j <= H + W - 2; j++) {
			ret = min(ret, dist[i][j]);
		}
	}
	cout << ret << endl;
	return 0;
}
