#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;	
} 

Measured memory_bytes: 2560