#include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;

typedef long long ll;

const int N=2e5+1e3+7;

const double pi=acos(-1);

struct node{
	ll x,y;
}p[N];

ll n,a[N],g[N],sx,sy,tx,ty,cnt,f[N],tot;

ll sxx,txx,syy,tyy;

double ans;

bool cmp(node a,node b)
{
	return a.x<b.x;
}

int main()
{
	cin>>sx>>sy>>tx>>ty;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>p[i].x>>p[i].y;
		if(sx>tx)
			p[i].x=-p[i].x;
		if(sy>ty)
			p[i].y=-p[i].y;
	}
	if(sx>tx)
		sx=-sx,tx=-tx;
	if(sy>ty)
		sy=-sy,ty=-ty;
	sort(p+1,p+n+1,cmp);
	sxx=min(sx,tx);
	txx=max(sx,tx);
	syy=min(sy,ty);
	tyy=max(sy,ty);
	for(int i=1;i<=n;i++)
		if(p[i].x>=sxx&&p[i].x<=txx&&p[i].y>=syy&&p[i].y<=tyy)
			a[++cnt]=p[i].y;
	for(int i=1;i<=cnt;i++)
		g[i]=1e20;
	for(int i=1;i<=cnt;i++)
	{
		ll k=lower_bound(g+1,g+cnt+1,a[i])-g;
		g[k]=a[i];
		tot=max(tot,k);
	}
	ans=abs(ty-sy)+abs(tx-sx);
	ans*=100;
	if(tot==min(abs(sx-tx)+1,abs(sy-ty)+1))
		ans+=5*pi;
	ans-=(double)tot*20;
	ans+=(double)tot*pi/2*10;
	printf("%.20lf",ans);
}