#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using pii = pair<int,int>;
using ld = long double;
#define um unordered_map
#define f(i,a,b) for (int i = a; i < b; i++)
#define Max(a,b) a=max(a,b)
#define IN(a,i,b) (a<=i&&i<=b)
#define pb push_back
const int mxn = 4e5+7;
struct BIT {
um<int,int> tree;
void cmod(int i, int x) {
for (; i < mxn; i |= i+1)
Max(tree[i],x);
}
int query(int i) {
int ans = 0;
for (; i >= 0; i = (i&(i+1))-1)
if (tree.count(i))
Max(ans,tree[i]);
return ans;
}
};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifdef LOCAL
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
clock_t start = clock();
#endif
int x1,y1,x2,y2;
int n;
cin>>x1>>y1>>x2>>y2>>n;
bool a = 0, b = 0;
if (x1>x2) a=1,x1*=-1,x2*=-1;
if (y1>y2) b=1,y1*=-1,y2*=-1;
vi X,Y;
ld res = 100LL*abs(x1-x2) + 100LL*abs(y1-y2);
map<int,int> com;
com[x1]=com[y1]=com[x2]=com[y2]=0;
f(i,0,n) {
int x,y; cin>>x>>y;
if (a) x*=-1;
if (b) y*=-1;
if (IN(x1,x,x2) && IN(y1,y,y2)) {
X.pb(x); Y.pb(y);
}
}
int t = 0;
for (pii pp : com)
com[pp.first] = t++;
x1 = com[x1]; y1 = com[y1]; x2 = com[x2]; y2 = com[y2];
n = X.size();
f(i,0,n) {
X[i] = com[X[i]];
Y[i] = com[Y[i]];
}
vi p(n);
f(i,0,n) p[i] = 0;
sort(begin(p),end(p),[&](int i, int j) {
return X[i] < X[j];
});
int ans = 0;
BIT ds;
f(j,0,n) {
int i = p[j];
int z = ds.query(Y[i])+1;
ds.cmod(Y[i],z);
Max(ans,z);
}
if ((x1==x2||y1==y2)&&n) {
res += 10*M_PI-20;
} else res += ans*(10*M_PI/2-20);
cout << setprecision(30) << res << endl;
#ifdef LOCAL
cout << setprecision(12) << (long double)(clock()-start) / CLOCKS_PER_SEC << endl;
#endif
return 0;
}