#include <bits/stdc++.h>
#ifdef DEMETRIO
#define deb(...) fprintf(stderr,__VA_ARGS__)
#define deb1(x) cerr << #x << " = " << x << endl
#else
#define deb(...) 0
#define deb1(x) 0
#endif
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i)
#define SZ(x) ((int)(x).size())
#define mset(a,v) memset(a,v,sizeof(a))
#define mcpy(a,b) memcpy(a,b,sizeof(a))
using namespace std;
typedef long long ll;

#define y0 qegipqp
#define y1 egknqepm

const double PI=acos(-1);
ll x0,x1,y0,y1;int n;double r;int l;
vector<pair<ll,ll> > w;
ll t[200005];

int main(){
	scanf("%lld%lld%lld%lld%d",&x0,&y0,&x1,&y1,&n);
	fore(i,0,n){
		ll x,y;
		scanf("%lld%lld",&x,&y);
		if(x>=min(x0,x1)&&x<=max(x0,x1)&&y>=min(y0,y1)&&y<=max(y0,y1)){
			w.pb(mp(x,y));
		}
	}
	r=abs(x0-x1)+abs(y0-y1);
	if(!SZ(w)){printf("%.15lf\n",r*100);return 0;}
	if(x0==x1||y0==y1){printf("%.15lf\n",(r-.2+.1*PI)*100);return 0;}
	if(x0>x1)fore(i,0,SZ(w))w[i].fst*=-1;
	if(y0>y1)fore(i,0,SZ(w))w[i].snd*=-1;
	sort(w.begin(),w.end());
	t[0]=-(1LL<<60);
	fore(i,1,200005)t[i]=(1LL<<60);
	fore(i,0,SZ(w)){
		ll x=w[i].snd;
		int k=lower_bound(t,t+200005,x)-t;
		l=max(l,k);
		t[k]=min(t[k],x);
	}
	ll d=min(abs(x0-x1),abs(y0-y1));
	if(l==d+1){
		r-=.2*d;r+=.1*PI/2*d;
		r-=.2;r+=.1*PI;
	}
	else {
		r-=.2*l;r+=.1*PI/2*l;
	}
	printf("%.15lf\n",r*100);
	return 0;
}