#include "bits/stdc++.h"
#include <sys/timeb.h>
#include <fstream>

using namespace std;

#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define replrev(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)
#define reprev(i,n) replrev(i,0,n)
#define repi(itr,ds) for(auto itr=ds.begin();itr!=ds.end();itr++)
#define all(a) a.begin(),a.end()
#define mp make_pair
#define mt make_tuple
#define INF 2000000000
#define INFL 1000000000000000000LL
#define EPS (1e-8)
#define MOD 1000000007
#define PI 3.141592653589793
#define RMAX 4294967295

typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<P> vP;
typedef vector<vector<int> > vvi;
typedef vector<vector<bool> > vvb;
typedef vector<vector<ll> > vvll;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<double> > vvd;
typedef vector<vector<P> > vvP;
typedef priority_queue<int, vector<int>, greater<int> > pqli;
typedef priority_queue<ll, vector<ll>, greater<ll> > pqlll;
typedef priority_queue<P, vector<P>, greater<P> > pqlP;
//*
// シンプルな構文解析用
typedef string::const_iterator State;
class ParseError {};
//*/
struct Edge {
	int from, to, cost;
	bool operator<(Edge e) {
		return cost < e.cost;
	}
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;

#define index_of(as, x) distance(as.begin(), lower_bound(as.begin(), as.end(), x))
vector<int> lis(const vector<int>& a) {
	const int n = a.size();
	vector<int> A(n, INF);
	vector<int> id(n);
	for (int i = 0; i < n; ++i) {
		id[i] = index_of(A, a[i]);
		A[id[i]] = a[i];
	}
	int m = *max_element(id.begin(), id.end());
	vector<int> b(m + 1);
	for (int i = n - 1; i >= 0; --i)
		if (id[i] == m) b[m--] = a[i];
	return b;
}

int main(void) {
	cout << fixed << setprecision(15);
	int x1, y1, x2, y2;
	int N;
	cin >> x1 >> y1 >> x2 >> y2 >> N;
	vi x(N), y(N);

	if (x1 == x2) {
		int num = 0;
		rep(i, N) {
			cin >> x[i] >> y[i];
			if (x[i] == x1 && min(y1, y2) < y[i] && y[i] < max(y1, y2)) {
				num++;
			}
		}
		cout << abs(y1 - y2) * 100.0 + num*(10 * PI - 20) << endl;
		return 0;
	}
	if (y1 == y2) {
		int num = 0;
		rep(i, N) {
			cin >> x[i] >> y[i];
			if (y[i] == y1 && min(x1, x2) < x[i] && x[i] < max(x1, x2)) {
				num++;
			}
		}
		cout << abs(x1 - x2) * 100.0 + num*(10 * PI - 20) << endl;
		return 0;
	}

	bool revy = false;
	if (x1 > x2) {
		int tmp = x1;
		x1 = x2;
		x2 = tmp;
		tmp = y1;
		y1 = y2;
		y2 = tmp;
	}
	if (y1 > y2) {
		y1 = -y1;
		y2 = -y2;
		revy = true;
	}

	rep(i, N) {
		cin >> x[i] >> y[i];
		if (revy) {
			y[i] = -y[i];
		}
	}
	vP points;
	rep(i, N) {
		if (x1 <= x[i] && x[i] <= x2 && y1 <= y[i] && y[i] <= y2) {
			points.push_back(mp(x[i], y[i]));
		}
	}
	if (points.size() == 0) {
		cout << (y2 - y1 + x2 - x1) * 100.0 << endl;
		return 0;
	}
	sort(all(points));
	vi arr(points.size());

	rep(i, points.size()) {
		arr[i] = points[i].second;
	}

	vi lisarr = lis(arr);

	int num2 = lisarr.size();

	if (num2 == min(y2 - y1, x2 - x1) + 1) {
		cout << (y2 - y1 + x2 - x1) * 100.0 - (20.0 - 5.0 * PI)*(num2 - 1) + (10 * PI - 20) << endl;
	}
	else {
		cout << (y2 - y1 + x2 - x1) * 100.0 - (20.0 - 5.0 * PI)*num2 << endl;
	}

	return 0;
}

Measured memory_bytes: 6512