#include <algorithm>  
#include <iostream>  
#include <sstream>  
#include <string>  
#include <cstring>
#include <vector>  
#include <queue>  
#include <set>  
#include <map>  
#include <cstdio>  
#include <cstdlib>  
#include <cctype>  
#include <cmath>  
#include <list>  
#include <cassert>
#include <ctime>
#include <climits>
using namespace std;  

#define PB push_back  
#define MP make_pair  
#define SZ(v) ((int)(v).size())  
#define FOR(i,a,b) for(int i=(a);i<(b);++i)  
#define REP(i,n) FOR(i,0,n)  
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)  
#define REPE(i,n) FORE(i,0,n)  
#define FORSZ(i,a,v) FOR(i,a,SZ(v))  
#define REPSZ(i,v) REP(i,SZ(v))  
typedef long long ll;
typedef unsigned long long ull;
ll gcd(ll a,ll b) { return b==0?a:gcd(b,a%b); }

const int MAXN=200000;
const double MPI=acos(-1.0);

typedef struct P { int x,y; } P;
bool operator<(const P &a,const P &b) { return a.x<b.x; }

int n;
P s,t;
P p[MAXN];

int lis[MAXN],nlis;

double solve() {
	{ int nn=0; REP(i,n) if(!(p[i].x<s.x&&p[i].x<t.x||p[i].x>s.x&&p[i].x>t.x||p[i].y<s.y&&p[i].y<t.y||p[i].y>s.y&&p[i].y>t.y)) p[nn++]=p[i]; n=nn; }
	REP(i,n) p[i].x-=s.x,p[i].y-=s.y; t.x-=s.x,t.y-=s.y,s.x-=s.x,s.y-=s.y;
	if(t.x<0) { REP(i,n) p[i].x=-p[i].x; t.x=-t.x; }
	if(t.y<0) { REP(i,n) p[i].y=-p[i].y; t.y=-t.y; }
	//printf("(%d,%d)->(%d,%d):",s.x,s.y,t.x,t.y); REP(i,n) printf(" (%d,%d)",p[i].x,p[i].y); puts("");
	if(t.x==0) { bool any=false; REP(i,n) if(p[i].x==0) any=true; return 100.0*t.y+(any?1:0)*(10.0*MPI-20.0); }
	if(t.y==0) { bool any=false; REP(i,n) if(p[i].y==0) any=true; return 100.0*t.x+(any?1:0)*(10.0*MPI-20.0); }
	
	sort(p,p+n); nlis=0;
	REP(i,n) {
		int l=-1,h=nlis; while(l+1<h) { int m=l+(h-l)/2; if(p[i].y<=lis[m]) h=m; else l=m; } int idx=h;
		lis[idx]=p[i].y; if(idx==nlis) ++nlis;
	}
	double ret=100.0*(t.x+t.y);
	int nskip=nlis;
	if(nskip==min(t.x+1,t.y+1)) {
		ret+=10.0*MPI-20.0;
		--nskip;
	}
	ret-=nskip*(20.0-5.0*MPI);
	return ret;
}


void run() {
	scanf("%d%d%d%d",&s.x,&s.y,&t.x,&t.y);
	scanf("%d",&n); REP(i,n) scanf("%d%d",&p[i].x,&p[i].y);

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

bool valid() {
	int xmask=0,ymask=0;
	REP(i,n) {
		int cx=p[i].x; if((xmask>>cx)&1) return false; xmask|=1<<cx;
		int cy=p[i].y; if((ymask>>cy)&1) return false; ymask|=1<<cy;
	}
	REP(i,n) if(p[i].x==s.x&&p[i].y==s.y) return false;
	REP(i,n) if(p[i].x==t.x&&p[i].y==t.y) return false;
	if(s.x==t.x&&s.y==t.y) return false;
	return true;
}

const int BORDER=10,MAXDIM=10;
const int H=MAXDIM+2*BORDER,W=MAXDIM+2*BORDER;
const int DX[]={-1,0,+1,0},DY[]={0,-1,0,+1};

bool has[H][W];
double d[H][W][4];
priority_queue<pair<double,pair<pair<int,int>,int> > > pq;

double bf() {
	int sx=s.x+BORDER,sy=s.y+BORDER,tx=t.x+BORDER,ty=t.y+BORDER;
	REP(x,H) REP(y,W) has[x][y]=false; REP(x,H) REP(y,W) REP(z,4) d[x][y][z]=1e200;
	REP(i,n) has[p[i].x+BORDER][p[i].y+BORDER]=true;
	d[sx][sy][0]=0; pq.push(MP(-d[sx][sy][0],MP(MP(sx,sy),0)));
	while(!pq.empty()) {
		double cost=-pq.top().first; int x=pq.top().second.first.first,y=pq.top().second.first.second,z=pq.top().second.second; pq.pop();
		if(cost>d[x][y][z]+1e-12) continue;
		//printf("d[%d][%d][%d]=%lf\n",x,y,z,cost);
		REP(k,4) {
			int nx=x+DX[k],ny=y+DY[k];
			if(nx<0||nx>=H||ny<0||ny>=W) continue;
			int nz=!has[nx][ny]?0:(k^2);
			double ncost=cost+100;
			if(has[x][y]) ncost+=(k==z?0:(k^2)==z?10*MPI:5*MPI)-10;
			if(has[nx][ny]) ncost-=10;
			if(ncost<d[nx][ny][nz]) {
				//printf("->[%d][%d][%d]=%lf (%d,%d)\n",nx,ny,nz,ncost,has[x][y]?1:0,has[nx][ny]?1:0);
				d[nx][ny][nz]=ncost,pq.push(MP(-d[nx][ny][nz],MP(MP(nx,ny),nz)));
			}
		}
	}
	return d[tx][ty][0];
}

void stress() {
	REP(rep,100000) {
		s.x=rand()%MAXDIM,s.y=rand()%MAXDIM,t.x=rand()%MAXDIM,t.y=rand()%MAXDIM;
		n=5; REP(i,n) p[i].x=rand()%MAXDIM,p[i].y=rand()%MAXDIM;
		//if(rep!=284) continue;
		//{ printf("%d %d %d %d\n",s.x,s.y,t.x,t.y); printf("%d\n",n); REP(i,n) printf("%d %d\n",p[i].x,p[i].y); }
		if(!valid()) continue;
		double want=bf();
		double have=solve();
		double diff=abs(want-have),rdiff=diff/want;
		if(rdiff>1e-12) { 
			printf("err %d (have=%lf want=%lf)\n",rep,have,want);
		} else printf(".");
		//break;
	}
}

int main() {
	//stress();
	run();
	return 0;
}


Measured memory_bytes: 2560