#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<algorithm>
#include<iostream>
#include<cstring>
#include<fstream>
#include<bitset>
#include<cstdio>
#include<string>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<map>
#include<set>
#define INF 0X3F3F3F3F
#define N 200005
#define M 200005
#define LL long long
#define FF(i, a, b) for(int i = a; i <= b; ++i)
#define RR(i, a, b) for(int i = a; i >= b; --i)
#define FJ(i, a, b) for(int i = a; i < b; ++i)
#define SC(x) scanf("%d", &x)
#define SCC(x, y) scanf("%d%d", &x, &y)
#define SCCC(x, y, z) scanf("%d%d%d", &x, &y, &z)
#define SS(x) scanf("%s", x)
#define PR(x) printf("%d\n", x)
#define CL(a, x) memset(a, x, sizeof(a))
#define _P fd[rt]
#define _L fd[rt << 1]
#define _R fd[rt << 1 | 1]
#define MID int mid = ((l + r) >> 1)
#define lson rt<<1 ,l, mid
#define rson rt<<1 | 1, mid + 1, r
#define VI vector<int>
#define PII pair<int, int>
#define PLL pair<long long, long long>
#define MP make_pair
#define PB push_back
#define IN freopen("in.txt", "r", stdin)
#define OUT freopen("out.txt", "w", stdout)
using namespace std;
const int MOD = 1000000007;
const double PI = acos(-1.0);
const double EPS = 1e-8;
inline void II(int &n){char ch = getchar(); n = 0; bool t = 0;
for(; ch < '0'; ch = getchar()) if(ch == '-') t = 1;
for(; ch >= '0'; n = n * 10 + ch - '0', ch = getchar()); if(t) n =- n;}
inline void OO(int a){if(a < 0) {putchar('-'); a = -a;}
if(a >= 10) OO(a / 10); putchar(a % 10 + '0');}
inline int sgn(double x){return (x > EPS) - (x < -EPS);}
int n, x1, yy1, x2, y2;
struct T{
    int x, y;
    bool operator < (const T& rhs) const{
        return x < rhs.x;
    }
    bool operator == (const T& rhs) const{
        return x == rhs.x;
    }
    bool operator <= (const T& rhs) const{
        return x <= rhs.x;
    }
    bool operator > (const T& rhs) const{
        return x > rhs.x;
    }
}a[N], tmp;
const double per = 20 - 5 * PI;
int cnt, b[N], bn, best[N];
double ans;
int main(){
   // IN;
    SCC(x1, yy1);
    SCC(x2, y2);
    if(x1 > x2){
        swap(x1, x2);
        swap(yy1, y2);
    }
    SC(n);
    FF(i, 1, n) SCC(a[i].x, a[i].y);
    sort(a + 1, a + 1 + n);
    tmp.x = x1, tmp.y = 0;
    int lpos = lower_bound(a + 1, a + 1 + n, tmp) - a;
    tmp.x = x2, tmp.y = 0;
    int rpos = upper_bound(a + 1, a + 1 + n, tmp) - a - 1;
    //if(rpos > n) rpos = n;
    if(yy1 <= y2){
        FF(i, lpos, rpos){
            if(a[i].y >= yy1 && a[i].y <= y2){
                b[++bn] = a[i].y;
            }
        }
        memset(best, 0x3f, sizeof(best));
        cnt = 0;
        FF(i, 1, bn){
            int L=1,R=cnt;
            while(L<=R){
                int mid=(L+R)/2;
                if(best[mid]>b[i]) R=mid-1;
                else L=mid+1;
            }
            cnt=max(cnt,L);
            best[L]=min(best[L],b[i]);
        }
        int lim = min(x2 - x1 + 1, y2 - yy1 + 1);
        ans = 1.0 * 100 * (x2 - x1) + 1.0 * 100 * (y2 - yy1);
        ans -= cnt * per;
        if(lim == cnt) ans += 5 * PI;
    }else {
        FF(i, lpos, rpos){
            if(a[i].y >= y2 && a[i].y <= yy1){
                b[++bn] = a[i].y;
            }
        }
        memset(best, 0, sizeof(best));
        cnt = 0;
        FF(i, 1, bn){
            int L=1,R=cnt;
            while(L<=R){
                int mid=(L+R)/2;
                if(best[mid]>b[i]) L=mid+1;
                else R=mid-1;
            }
            cnt=max(cnt,L);
            best[L]=max(best[L],b[i]);
        }
        int lim = min(x2 - x1 + 1, yy1 - y2 + 1);
        ans = 1.0 * 100 * (x2 - x1) + 1.0 * 100 * (yy1 - y2);
        ans -= cnt * per;
        if(lim == cnt) ans += 5 * PI;
    }
    printf("%.16f\n", ans);
    return 0;
}


Measured memory_bytes: 3328