// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cmath>

#include <algorithm>



typedef double r64;

const r64 PI = acos(-1);

const r64 C1 = 5 * (PI - 4);

const r64 C2 = 10 * (PI - 2);

const int Inf = 0x3f3f3f3f;

const int MN = 200005;



int sx, sy, tx, ty, N, K, px[MN], py[MN], p[MN];

r64 Ans;



int f[MN];



int main() {

	scanf("%d%d%d%d%d", &sx, &sy, &tx, &ty, &N);

	Ans = 100ll * (abs(tx - sx) + abs(ty - sy));

	if (sx > tx) std::swap(sx, tx), std::swap(sy, ty);

	int rev = sy > ty;

	if (rev) std::swap(sy, ty);

	for (int i = 1, x, y; i <= N; ++i) {

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

		if (x < sx || tx < x || y < sy || ty < y) continue;

		if (rev) y = -y;

		px[++K] = x, py[K] = y, p[K] = K;

	}

	std::sort(p + 1, p + K + 1, [](int i, int j) { return px[i] < px[j]; });

	int num = 0;

	f[0] = -Inf;

	for (int i = 1; i <= K; ++i) f[i] = Inf;

	for (int i = 1; i <= K; ++i) {

		int v = py[p[i]];

		int j = std::lower_bound(f, f + K + 1, v) - f;

		if (num < j) num = j;

		f[j] = v;

	}

	if (num == std::min(tx - sx, ty - sy) + 1) Ans += (num - 1) * C1 + C2;

	else Ans += num * C1;

	printf("%.15lf\n", Ans);

	return 0;

}

// Fastest known solution for this problem: