#include <iostream>
#include <sstream>
#include <fstream>

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>

#include <algorithm>
#include <numeric>
#include <functional>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <list>
#include <map>
// #include <unordered_map>
#include <set>
#include <utility>
#include <bitset>
#include <limits>
#include <climits>
using namespace std;

#ifdef DEBUG
#define NDEBUG
#include "cout11.h"
#endif
#undef NDEBUG
#include <cassert>

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> ii;
typedef pair<ll,ll> llll;
typedef pair<double,double> dd;

typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<ii> vii;
typedef vector<vector<ii>> vvii;
typedef vector<ll> vll;

#define sz(a)  int((a).size())
#define pb  push_back
#define FOR(var,from,to) for(int var=(from);var<=(to);++var)
#define rep(var,n)  for(int var=0;var<(n);++var)
#define rep1(var,n)  for(int var=1;var<=(n);++var)
#define repC2(vari,varj,n)  for(int vari=0;vari<(n)-1;++vari)for(int varj=vari+1;varj<(n);++varj)
#define ALL(c)  (c).begin(),(c).end()
#define tr(i,c)  for(auto i=(c).begin(); i!=(c).end(); ++i)
#define found(s,e)  ((s).find(e)!=(s).end())
#define mset(arr,val)  memset(arr,val,sizeof(arr))
#define mid(x,y) ((x)+((y)-(x))/2)
#define IN(x,a,b) ((a)<=(x)&&(x)<=(b))

#define INTSPACE 11
char _buf[INTSPACE*1000000 + 3];  // ここ要確認

int loadint() {
    if (fgets(_buf, INTSPACE+3, stdin)==NULL) return 0;
    return atoi(_buf);
}
int loadvec(vector<int>& v, int N=-1) {
    if (N == -1) {
        N = loadint();
        if (N==0) return 0;
    }
    int bufsize = INTSPACE*N + 3;
    if (fgets(_buf, bufsize, stdin)==NULL) return 0;
    v.resize(N);

    int i=0;
    bool last = false;
    for (char *p=&_buf[0]; ;) {
        char *q = p;
        while (*q > ' ') ++q;
        if (*q == 0x0D || *q == 0x0A) last = true;
        *q = 0;
        v[i++] = atoi(p);
        if (last || i == N) break;
        p = q+1;
    }
    return i;
}


int lis(vector<int>& a) {
    int M = a.size();
    if (M == 0) return 0;

    // cout << a << endl;
    assert(0 < M && M <= 200000);

    vector<int> dp(M, 1e9);
    dp[0] = a[0];
    int maxlen = 1;
    for (int i=1; i<M; ++i) {
        int len = (int)(lower_bound(dp.begin(),dp.begin()+i, a[i]) - dp.begin())+1;
        maxlen = max(maxlen, len);
        dp[len-1] = min(dp[len-1], a[i]);
    }
    // cout << dp << endl;
    return maxlen;
}

int main() {
    vector<int> tmp(4);
    loadvec(tmp,4);
    int x1=tmp[0], y1=tmp[1], x2=tmp[2], y2=tmp[3];
    int xmin=min(x1,x2), xmax=max(x1,x2);
    int ymin=min(y1,y2), ymax=max(y1,y2);
    if (x2 < x1) {
        swap(x1,x2); swap(y1,y2);
    }
    long double ans = 100.0 * ((xmax - xmin) + (ymax - ymin));
    long double pi = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899;

    int N = loadint();
    vector<ii> ft;
    ft.reserve(N);
    rep(i,N){
        loadvec(tmp,2);
        int Xi=tmp[0], Yi=tmp[1];
        if (IN(Xi,xmin,xmax) && IN(Yi,ymin,ymax)) {
            ft.pb(ii(Xi,Yi));
        }
    }
    sort(ALL(ft));
    int M = ft.size();
    vector<int> a(M);
    rep(i,M) a[i] = ft[i].second;
    if (xmax == xmin || ymax == ymin) {
        // cout << a << endl;
        assert(M == 0 || M == 1);
        ans += (pi*10 - 20)*M; // M = 0 or 1
    } else if (M > 0) {
        assert(x1 < x2);
        if (y1 > y2) {
            rep(i,M) a[i] = ymax - a[i];
        } else {
            rep(i,M) a[i] -= ymin;
        }
        // cout << a << endl;
        int L = lis(a); // 1..M

        if (L == ymax-ymin+1 || L == xmax-xmin+1) {
            ans -= (20.0 - pi*5) * (L-1);
            ans += (pi*10 - 20);
        } else {
            ans -= (20.0 - pi*5) * L;
        }
    }
    printf("%.15Lf\n", ans);
    return 0;
}


Measured memory_bytes: 3456