/*
*/

#pragma GCC optimize("O3")
#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <iostream>
#include <string>
#include <complex>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stdio.h>
#include <stack>
#include <algorithm>
#include <list>
#include <ctime>

#include <memory.h>
#include <assert.h>

#define y0 sdkfaslhagaklsldk

#define y1 aasdfasdfasdf
#define yn askfhwqriuperikldjk
#define j1 assdgsdgasghsf
#define tm sdfjahlfasfh
#define lr asgasgash
#define norm asdfasdgasdgsd
#define have adsgagshdshfhds
#define ends asdgahhfdsfshdshfd

#define eps 1e-11
#define M_PI 3.141592653589793
#define bsize 512

#define ldouble long double
using namespace std;

#define bs 1000000007
const int N = 501031;

int x1,y1,x2,y2,n;
int x[N],y[N];
vector<pair<int,int> > ip;
int t[N*4];

bool is_good(int a,int b)
{
	return (a>=min(x1,x2)&&a<=max(x1,x2)&&b>=min(y1,y2)&&b<=max(y1,y2));
}

long double ans;

void run_mirror()
{
	y1=bs-y1;
	y2=bs-y2;
	for (int i=0;i<ip.size();i++)
	{
		ip[i].second*=-1;
	}
}

int dp[N];

vector<int> xs,ys;
map<int,int> xmap,ymap;

vector<int> make_unique(vector<int> v){
	vector<int> ret;
	sort(v.begin(),v.end());
	for (int i=0;i<v.size();i++)
	{
		if (i==0||v[i]!=v[i-1])
			ret.push_back(v[i]);
	}
	return ret;
}

void run_compress()
{
	for (int i=0;i<ip.size();i++)
	{
		xs.push_back(ip[i].first);
		ys.push_back(ip[i].second);
	}
	xs=make_unique(xs);
	ys=make_unique(ys);
	for (int i=0;i<xs.size();i++)
	{
		xmap[xs[i]]=i;
	}
	for (int i=0;i<ys.size();i++)
	{
		ymap[ys[i]]=i;
	}
	for (int i=0;i<ip.size();i++)
	{
		ip[i].first=xmap[ip[i].first];
		ip[i].second=ymap[ip[i].second];
	}
}

void update(int v,int tl,int tr,int ps,int val){
	if (tl==tr)
	{
		t[v]=max(t[v],val);
		return;
	}
	int tm=tl+tr;
	tm/=2;
	if (ps<=tm)
		update(v*2,tl,tm,ps,val);
	else
		update(v*2+1,tm+1,tr,ps,val);
	t[v]=max(t[v*2],t[v*2+1]);
}

int get(int v,int tl,int tr,int l,int r){
	if (l>r)
		return 0;
	if (tl==l&&tr==r)
		return t[v];
	int tm=tl+tr;
	tm/=2;
	return max(get(v*2,tl,tm,l,min(r,tm)),get(v*2+1,tm+1,tr,max(tm+1,l),r));
}

int lis()
{
	sort(ip.begin(),ip.end());

	run_compress();

	for (int i=0;i<ip.size();i++)
	{
		if (i>0&&ip[i].first!=ip[i-1].first)
		{
			for (int j=i-1;j>=0;--j)
			{
				if (ip[j].first!=ip[i-1].first)
					break;
				int ps=ip[j].second;
				update(1,0,N-1,ps,dp[j]);
			}
		}

		int here=get(1,0,N-1,0,ip[i].second-1);
		dp[i]=here+1;
	}
	int res=0;
	for (int i=0;i<ip.size();i++)
	{
		res=max(res,dp[i]);
	}
	return res;
}

set<int> set_of_x;
set<int>set_of_y;

bool fkn_special_case()
{
	for (int i=0;i<ip.size();i++)
	{
		set_of_x.insert(ip[i].first);
		set_of_y.insert(ip[i].second);
	}
	//cout<<set_of_x.size()<<" "<<set_of_y.size()<<endl;

	return (set_of_x.size()==abs(x1-x2)+1||set_of_y.size()==abs(y1-y2)+1);
}

int main(){
	//freopen("tree.in","r",stdin);
	//freopen("tree.out","w",stdout);
	//freopen("input.txt", "r", stdin);
	//freopen("out.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	//cin.tie(0);

	cin>>x1>>y1>>x2>>y2;

	cin>>n;

	for (int i=0;i<n;i++)
	{
		cin>>x[i]>>y[i];
		if (is_good(x[i],y[i]))
		{
			ip.push_back(make_pair(x[i],y[i]));
		}
	}

	if (x1>x2)
	{
		swap(x1,x2);
		swap(y1,y2);
	}

	if (y1>y2)
	{
		run_mirror();
	}

	ans=abs(x1-x2)+abs(y1-y2);

	ans*=100;

	/*if (fkn_special_case())
	{
		ans+=20*M_PI/2;
		ans-=10*M_PI/2;
	}*/

	int res=lis();
	int G=abs(x1-x2)+1;
	G=min(G,abs(y1-y2)+1);
	if (res==G)
	{
			ans+=20*M_PI/2;
			ans-=10*M_PI/2;
	}

	ans=ans-(20-20*M_PI/4)*res;

	cout.precision(12);
	cout<<fixed<<ans<<endl;

	cin.get(); cin.get();
	return 0;
}


Measured memory_bytes: 31728