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

#define X first

#define Y second

using namespace std;



const int S=(1<<20)+5;

char buf[S],*H,*T;

inline char Get() {

	if(H==T) T=(H=buf)+fread(buf,1,S,stdin);

	if(H==T) return -1;

	return *H++;

}

inline int read() {

	int x=0;

	char c=Get();

	while(!isdigit(c)) c=Get();

	while(isdigit(c)) x=x*10+c-'0',c=Get();

	return x;

}



typedef pair<int,int> pii;

const double pi=acos(-1);

const int N=200010;

const int MX=1e8+5;

int x1,yy1,x2,yy2,n,tot=0,lis;

int g[N],idx[N],a[N],f[N],gx[N],ax[N];

pii pnt[N];

bool deled[N];



int LIS() {

	int res=0;

	memset(g,0x7f,sizeof(g));

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

		auto it=lower_bound(g+1,g+1+n,a[i]);

		if(*it==0x7f7f7f7f) res++;

		*it=a[i];

	}

	return res;

}



int main() {

	x1=read();

	yy1=read();

	x2=read();

	yy2=read();

	n=read();

	for(int i=1; i<=n; i++) pnt[i].X=read(),pnt[i].Y=read();

	if(x2<x1||yy2<yy1) {

		if(x1<=x2) goto swap2;

		x1=MX-x1;

		x2=MX-x2;

		for(int i=1; i<=n; i++) pnt[i].X=MX-pnt[i].X;

		if(yy1<=yy2) goto work;

swap2:

		yy1=MX-yy1;

		yy2=MX-yy2;

		for(int i=1; i<=n; i++) pnt[i].Y=MX-pnt[i].Y;

	}

work:

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

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

		if(pnt[i].X>=x1&&pnt[i].X<=x2&&pnt[i].Y>=yy1&&pnt[i].Y<=yy2) a[++tot]=pnt[i].Y;

	double ans=100.0*(x2-x1+yy2-yy1)+(pi*5-20)*(lis=LIS());

	if(lis==min(x2-x1,yy2-yy1)+1) ans+=pi*5;

output:

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

	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: