#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;
const double pi=acos(-1.0);
const int N=200005,inf=100000000;
int a[N];
struct P{
	int x,y;
}p[N];
bool cmp(P a,P b){return a.x<b.x;}
int main(){
	int x1,y1,x2,y2,n,m=0;
	scanf("%d%d%d%d%d",&x1,&y1,&x2,&y2,&n);
	for (int i=1;i<=n;i++) scanf("%d%d",&p[i].x,&p[i].y);
	if (x1>x2) swap(x1,x2),swap(y1,y2);
	if (y1>y2){
		y1=inf-y1;y2=inf-y2;
		for (int i=1;i<=n;i++) p[i].y=inf-p[i].y;
	}
	for (int i=1;i<=n;)
		if (p[i].x<x1||p[i].x>x2||p[i].y<y1||p[i].y>y2) swap(p[i],p[n--]);
			else i++;
	sort(p+1,p+n+1,cmp);
	for (int i=1;i<=n;i++)
		if (p[i].y>=a[m]) a[++m]=p[i].y;
			else a[lower_bound(a+1,a+m+1,p[i].y)-a]=p[i].y;
	double ans=100.0*(x2-x1+y2-y1)+m*(5*pi-20);
	if (m==min(x2-x1,y2-y1)+1) ans+=5*pi;
	printf("%.15f\n",ans);
}