// Original C++ solution (slower):
#include<bits/stdc++.h>

#define one 15.7079632679489661923132169164

#define two 31.4159265358979323846264338328

#define Maxn 200005

#define INF 99999999

#define Re register

#define LL long long 

using namespace std; 

int X_1,Y_1,X_2,Y_2,Cnt=0,N,dp[Maxn];

struct Lover{int x,y;}T[Maxn];

inline void Read(int &x){int f=1;x=0;char ch=getchar();while (!isdigit(ch)) {if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)) {x=x*10+ch-'0';ch=getchar();}x*=f;} 

inline bool Cmp(Lover a,Lover b){return a.x<b.x;}

//inline int find(int l,int r,int x){if(f[r]<=x) return r+1;int ok=1;while(l<=r){int mid=l+r>>1;if(f[mid]<=x) ok=mid,l=mid+1;else r=mid-1;}return ok;}

//inline int solve() {int len=1;for (Re int i=1;i<=Cnt;i++) f[i]=INF;f[1]=T[1].y;for(Re int i=2;i<=Cnt;i++){int next=find(1,len,T[i].y); f[next]=T[i].y;if(len<next) len=next;}return len;}

inline int solve() {int len=1,iter;dp[1]=T[1].y;for (int i=2;i<=Cnt;i++) if (T[i].y>dp[len]) len++,dp[len]=T[i].y; else iter=lower_bound(dp+1,dp+len,T[i].y)-dp,dp[iter]=T[i].y;return len;}

int main()

{

	//freopen("loveround.in","r",stdin); freopen("loveround.out","w",stdout);

	Read(X_1),Read(Y_1),Read(X_2),Read(Y_2),Read(N);

	if (X_1==X_2||Y_1==Y_2)

	{

		if (X_1==X_2){int Tot=0;for (Re int x,y,i=1;i<=N;i++) {Read(x),Read(y);if ((x==X_1)&&(min(Y_1,Y_2)<y)&&(y<max(Y_1,Y_2))) Tot++;}printf("%.13lf\n",(double)((max(Y_1,Y_2)-min(Y_1,Y_2))*100.0+Tot*((double)two-20.0)));return 0;}

		if (Y_1==Y_2){int Tot=0;for (Re int x,y,i=1;i<=N;i++) {Read(x),Read(y);if ((y==Y_1)&&(min(X_1,X_2)<x)&&(x<max(X_1,X_2))) Tot++;}printf("%.13lf\n",(double)((max(X_1,X_2)-min(X_1,X_2))*100.0+Tot*((double)two-20.0)));return 0;}	

	} 

	else

	{

		if (X_1<X_2&&Y_1<Y_2)

		{

		for (Re int x,y,i=1;i<=N;i++) {Read(x),Read(y);if (X_1<=x&&x<=X_2&&Y_1<=y&&y<=Y_2) T[++Cnt]=(Lover){x,y};}sort(T+1,T+Cnt+1,Cmp);int Tot=0;if (Cnt) Tot=solve();

		if (Tot==abs(X_2-X_1)+1||Tot==abs(Y_2-Y_1)+1) printf("%.13lf\n",(double)(Y_2-Y_1+X_2-X_1)*100.0-(double)(Tot*(double)(20.0-one))+one); else printf("%.13lf\n",(double)(Y_2-Y_1+X_2-X_1)*100.0-(double)(Tot*(double)(20.0-one)));

		}

		if (X_1<X_2&&Y_1>Y_2)

		{

		for (Re int x,y,i=1;i<=N;i++) {Read(x),Read(y);if (X_1<=x&&x<=X_2&&Y_1>=y&&y>=Y_2) T[++Cnt]=(Lover){x,-y};}sort(T+1,T+Cnt+1,Cmp);int Tot=0;if (Cnt) Tot=solve();

		if (Tot==abs(X_2-X_1)+1||Tot==abs(Y_2-Y_1)+1) printf("%.13lf\n",(double)(Y_1-Y_2+X_2-X_1)*100.0-(double)(Tot*(double)(20.0-one))+one); else printf("%.13lf\n",(double)(Y_1-Y_2+X_2-X_1)*100.0-(double)(Tot*(double)(20.0-one)));

		}

		if (X_1>X_2&&Y_1<Y_2)

		{

		for (Re int x,y,i=1;i<=N;i++) {Read(x),Read(y);if (X_1>=x&&x>=X_2&&Y_1<=y&&y<=Y_2) T[++Cnt]=(Lover){-x,y};}sort(T+1,T+Cnt+1,Cmp);int Tot=0;if (Cnt) Tot=solve();

		if (Tot==abs(X_2-X_1)+1||Tot==abs(Y_2-Y_1)+1) printf("%.13lf\n",(double)(Y_2-Y_1+X_1-X_2)*100.0-(double)(Tot*(double)(20.0-one))+one); else printf("%.13lf\n",(double)(Y_2-Y_1+X_1-X_2)*100.0-(double)(Tot*(double)(20.0-one)));

		}

		if (X_1>X_2&&Y_1>Y_2)

		{

		for (Re int x,y,i=1;i<=N;i++) {Read(x),Read(y);if (X_1>=x&&x>=X_2&&Y_1>=y&&y>=Y_2) T[++Cnt]=(Lover){-x,-y};}sort(T+1,T+Cnt+1,Cmp);int Tot=0;if (Cnt) Tot=solve();

		if (Tot==abs(X_2-X_1)+1||Tot==abs(Y_2-Y_1)+1) printf("%.13lf\n",(double)(Y_1-Y_2+X_1-X_2)*100.0-(double)(Tot*(double)(20.0-one))+one); else printf("%.13lf\n",(double)(Y_1-Y_2+X_1-X_2)*100.0-(double)(Tot*(double)(20.0-one)));

		}

	}

	return 0;	

} 

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

#include <algorithm>

#include <cmath>

#include <cctype>

#define RI register int

#define Tp template <typename T>

#define y1 DEEP_DARK_FANTACY

#define y2 VAN

using namespace std;

inline char nc(){

	static char buf[100000],*L=buf,*R=buf;

	return L==R&&(R=(L=buf)+fread(buf,1,100000,stdin),L==R)?EOF:*L++;

}

inline void read(int& ret){

	ret=0; int f=1;char ch=nc();

	while (ch<'0'||ch>'9'){if (ch=='-') f=-1;ch=nc();}

	while (ch>='0'&&ch<='9') ret=ret*10+ch-'0',ch=nc();

	ret*=f;

}

const int N=2e6+5;

int x1,x2,y1,y2,n,F[N],top,dec;

struct dat{int x,y;}p[N];

double Ans;

inline bool valid(int i){

	return ((p[i].x>=x1&&p[i].x<=x2)||(p[i].x>=x2&&p[i].x<=x1))&&((p[i].y>=y1&&p[i].y<=y2)||(p[i].y>=y2&&p[i].y<=y1));

}

inline bool cmp1(dat A,dat B){return A.x<B.x||(A.x==B.x&&A.y<B.y);}

inline bool cmp2(dat A,dat B){return A.x<B.x||(A.x==B.x&&A.y>B.y);}

int main(){

	read(x1), read(y1), read(x2), read(y2), read(n);

	for (int i=1;i<=n;i++) read(p[i].x), read(p[i].y);

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

	F[0]=-2e9;

	if (y1<y2){

		sort(p+1,p+n+1,cmp1);

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

			if (F[top]<p[i].y) F[++top]=p[i].y; else F[upper_bound(F+1,F+top+1,p[i].y)-F]=p[i].y;

	} else{

		sort(p+1,p+n+1,cmp2);

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

			if (F[top]<-p[i].y) F[++top]=-p[i].y; else F[upper_bound(F+1,F+top+1,-p[i].y)-F]=-p[i].y;

	}

	double delta=20.0-2.0*M_PI_4*10.0;

	if (top==min(abs(x1-x2),abs(y1-y2))+1) 	Ans=(abs(x2-x1)+abs(y1-y2))*100.0-(top-1)*1.0*delta+(M_PI*10.0-20);

		else Ans=((x2-x1)+abs(y1-y2))*100.0-top*1.0*delta;

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

	return 0;

}

// Fastest known solution for this problem: