#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "iomanip"
#include "random"
 
using namespace std;
 
const long long int MOD = 1000000007;
const long double EPS = 0.00000001;
const long double PI = 3.1415926535897932384626433832795028841971;
 
long long int N, M, K, W, H, L, R;
 
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
 
	long long int sy, sx, gy, gx;
	cin >> sx >> sy >> gx >> gy;
	if (sx > gx) {
		swap(sx, gx);
		swap(sy, gy);
	}
	cin >> N;
	long long int x[200000] = {};
	long long int y[200000] = {};
	map<int, int>m;
	for (int i = 0; i < N; i++) {
		cin >> x[i] >> y[i];
		m[x[i]] = y[i];
	}
	if (gx == sx) {
		long double ans = 0;
		for (int i = 0; i < N; i++) {
			if (x[i] == sx) {
				if (sy > gy) {
					swap(sy, gy);
				}
				if (sy < y[i] && y[i] < gy) {
					ans += PI * 10;
					ans -= 20;
				}
 
			}
		}
		ans += abs(sy - gy) * 100;
		cout << setprecision(25) << ans << endl;
		return 0;
	}
	if (sy == gy) {
		long double ans = 0;
		for (int i = 0; i < N; i++) {
			if (y[i] == sy) {
				if (sx > gx) {
					swap(sx, gx);
				}
				if (sx < x[i] && x[i] < gx) {
					ans += PI * 10;
					ans -= 20;
				}
 
			}
		}
		ans += abs(sx - gx) * 100;
		cout << setprecision(25) << ans << endl;
		return 0;
	}
	if (sy < gy) {
		vector<int>dp(N + 1, INT_MAX);
		dp[0] = 0;
		int mlong = 0;
		for (auto i : m) {
			if (i.first < sx)continue;
			if (i.first > gx)break;
			if (i.second < sy || i.second > gy)continue;
			if (!mlong) {
				mlong++;
				dp[mlong] = i.second;
			}
			else {
				L = 0;
				R = mlong + 1;
				long long int mid;
				int box = 0;
				while (R - L > 1) {
					box++;
					mid = (L + R + 1) / 2;
					if (dp[mid] > i.second) {
						R = mid;
					}
					else {
						L = mid ;
					}
					if (box > 50)break;
				}
				dp[L+1] = min(dp[L+1], i.second);
				mlong = max(mlong, (int)L+1);
			}
		}
		long double ans = 0;
		if (mlong == abs(sy - gy) + 1) {
			mlong--;
			ans += PI * 10 - 20;
		}
		else if (mlong == abs(sx - gx) + 1) {
			mlong--;
			ans += PI * 10 - 20;
		}
		ans += PI*mlong * 5;
		ans += abs(sx - gx) * 100;
		ans += abs(sy - gy) * 100;
		ans -= mlong * 20;
		cout << setprecision(25) << ans << endl;
	}
	else {
		vector<int>dp(N + 1, 0);
		dp[0] = INT_MAX;
		int box = 0;
		int mlong = 0;
		for (auto i : m) {
			if (i.first < sx)continue;
			if (i.first > gx)break;
			if (i.second > sy || i.second < gy)continue;
			box++;
			if (!mlong) {
				mlong++;
				dp[mlong] = i.second;
			}
			else {
				L = 0;
				R = mlong + 1;
				int mid;
				int box = 0;
				while (R - L > 1) {
					box++;
					mid = (L + R + 1) / 2;
					if (dp[mid] < i.second) {
						R = mid;
					}
					else {
						L = mid ;
					}
					if (box > 50)break;
				}
				dp[L+1] = max(dp[L+1], i.second);
				mlong = max(mlong, (int)L+1);
			}
		}
		long double ans = 0;
		if (mlong == abs(sy - gy) + 1) {
			mlong--;
			ans += PI * 10 - 20;
		}
		else if (mlong == abs(sx - gx) + 1) {
			mlong--;
			ans += PI * 10 - 20;
		}
		ans += PI*mlong * 5;
		ans += abs(sx - gx) * 100;
		ans += abs(sy - gy) * 100;
		ans -= mlong * 20;
		cout << setprecision(25) << ans << endl;
	}
 
	return 0;
}

Measured memory_bytes: 13696