// Slower C++ solution:
#include<bits/stdc++.h>

#define F(i,a,b) for(int i=a;i<=(b);++i)

#define F2(i,a,b) for(int i=a;i<(b);++i)

#define dF(i,a,b) for(int i=a;i>=(b);--i)

#define dF2(i,a,b) for(int i=a;i>(b);--i)

#define eF(i,u) for(int i=h[u];i;i=nxt[i])

#define ll long long

#define ld double

using namespace std;



ll Sx,Sy,Tx,Ty;

ll ansi,ansp=0;

int n,cnt,P[200001],Ans;

ll x[200001],y[200001];

ll X[200001],Y[200001],tmp[200001];

ll t[200001];

inline bool cmp(int p1,int p2){return X[p1]<X[p2];}



inline int BS(ll k){

	int l=0,r=cnt,mid,ans;

	while(l<=r){

		mid=l+r>>1;

		if(tmp[mid]>k) ans=mid, l=mid+1;

		else r=mid-1;

	}

	return ans;

}



int main(){

	scanf("%lld%lld%lld%lld",&Sx,&Sy,&Tx,&Ty);

	ansi=abs(Sx-Tx)+abs(Sy-Ty); ansi*=10;

	scanf("%d",&n);

	F(i,1,n) scanf("%lld%lld",x+i,y+i);

	if(Sx==Tx){

		if(Sy>Ty) swap(Sy,Ty);

		F(i,1,n) if(x[i]==Sx&&Sy<y[i]&&y[i]<Ty) ansi-=2, ansp+=10;

		printf("%.15lf",10.*ansi+acos(-1)*ansp); return 0;

	}

	if(Sy==Ty){

		if(Sx>Tx) swap(Sx,Tx);

		F(i,1,n) if(y[i]==Sy&&Sx<x[i]&&x[i]<Tx) ansi-=2, ansp+=10;

		printf("%.15lf",10.*ansi+acos(-1)*ansp); return 0;

	}

	if(Sx>Tx) swap(Sx,Tx), swap(Sy,Ty);

	if(Sy<Ty)

		F(i,1,n) if(Sx<=x[i]&&x[i]<=Tx&&Sy<=y[i]&&y[i]<=Ty) X[++cnt]=x[i], Y[cnt]=y[i], P[cnt]=cnt;

	if(Sy>Ty)

		F(i,1,n) if(Sx<=x[i]&&x[i]<=Tx&&Ty<=y[i]&&y[i]<=Sy) X[++cnt]=x[i], Y[cnt]=y[i], P[cnt]=cnt;

	F(i,1,cnt) t[i]=Y[i];

	sort(t+1,t+cnt+1);

	F(i,1,cnt) Y[i]=lower_bound(t+1,t+cnt+1,Y[i])-t;

	sort(P+1,P+cnt+1,cmp);

	if(Sy<Ty){

		memset(tmp,0x3f,sizeof tmp);

		tmp[0]=0;

		F(i,1,cnt){

			int k=lower_bound(tmp,tmp+cnt+1,Y[P[i]])-tmp;

			tmp[k]=min(tmp[k],Y[P[i]]);

			Ans=max(Ans,k);

		}

		if(Ans==min(abs(Sx-Tx),abs(Sy-Ty))+1) printf("%.15lf",10.*(ansi-2*Ans)+acos(-1)*5*Ans+5*acos(-1));

		else printf("%.15lf",10.*(ansi-2*Ans)+acos(-1)*5*Ans);

	}

	else{

		tmp[0]=0x3f3f3f3f;

		F(i,1,cnt){

			int k=BS(Y[P[i]]);

			tmp[k+1]=max(tmp[k+1],Y[P[i]]);

			Ans=max(Ans,k+1);

		}

		if(Ans==min(abs(Sx-Tx),abs(Sy-Ty))+1) printf("%.15lf",10.*(ansi-2*Ans)+acos(-1)*5*Ans+5*acos(-1));

		else printf("%.15lf",10.*(ansi-2*Ans)+acos(-1)*5*Ans);

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 9.381445220791864x):
#include<cstdio>

#include<algorithm>

using namespace std;

#define MAXN 200010

#define PI 3.1415926535897932384626433832795

struct node

{

	int x,y;

	bool operator < (const node &a)

	{

		return x<a.x;

	}

}e[MAXN];

int sx,sy,ex,ey,n;

void Pre()

{

	bool f=0;

	if(sy>ey) swap(sx,ex),swap(sy,ey);

	if(sy==ey&&sx>ex) swap(sx,ex);

	if(sx>ex) f=1,ex=2*sx-ex;

	ex-=sx,ey-=sy;

	int x,y,m=0;

	for(int i=1;i<=n;i++)

	{

		scanf("%d%d",&x,&y);

		if(f) x=2*sx-x;

		x-=sx,y-=sy;

		if(x<0||x>ex||y<0||y>ey) continue;

		e[++m].x=x,e[m].y=y;

	}

	sx=0,sy=0;

	n=m;

}

int a[MAXN],st[MAXN],r;

void Solve()

{

	for(int i=1;i<=n;i++)

		a[i]=e[i].y;

	st[0]=-1;

	for(int i=1;i<=n;i++)

	{

		if(a[i]>st[r]) st[++r]=a[i];

		else

		{

			int p=upper_bound(st,st+r+1,a[i])-st;

			st[p]=a[i];

		}

	}

}

int main()

{

	scanf("%d%d%d%d%d",&sx,&sy,&ex,&ey,&n);

	Pre();

	sort(e+1,e+1+n);

	Solve();

	int t=min(ex,ey)+1;

	double ans=100LL*(ex+ey);

	if(r==t) ans+=(r-1)*5LL*PI+10LL*PI-20LL*r;

	else ans+=r*5LL*PI-20LL*r;

	printf("%.12lf\n",ans);

}