// #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;
using ll = long long int;
using int64 = long long int;
 
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
 
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const int INF = 1LL << 29;
const ll LONGINF = 1LL << 60;
const ll MOD = 1000000007LL;

// @category セグメント木 (Segment Tree)
// @title セグメント木 (Segment Tree)
// 抽象 SegmentTree (0-indexed・一点更新・区間取得)
template <typename MonoidType>
struct SegmentTree {
    using Function = function< MonoidType(MonoidType, MonoidType) >;

    // node, identity element
    int n;
    vector<MonoidType> node;
    MonoidType E0;

    // update / combine function
    Function upd_f, cmb_f;

    void build(int m, vector<MonoidType> v = vector<MonoidType>()) {
        if(v != vector<MonoidType>()) m = v.size();
        n = 1; while(n < m) n *= 2;

        node = vector<MonoidType>(2*n-1, E0);
        if(v != vector<MonoidType>()) {
            for(int i=0; i<m; i++) {
                node[n-1+i] = v[i];
            }
            for(int i=n-2; i>=0; i--) {
                node[i] = cmb_f(node[2*i+1], node[2*i+2]);
            }
        }
    }

    // initialize
    SegmentTree() {}
    SegmentTree(int n_, MonoidType E0_,
                Function upd_f_, Function cmb_f_,
                vector<MonoidType> v = vector<MonoidType>()) :
        E0(E0_), upd_f(upd_f_), cmb_f(cmb_f_) {
        build(n_, v);
    }

    // update k-th element (applied value: x)
    void update(int k, MonoidType x) {
        k += n - 1;
        node[k] = upd_f(node[k], x);
        while(k > 0) {
            k = (k - 1) / 2;
            node[k] = cmb_f(node[2*k+1], node[2*k+2]);
        }
    }

    // range query for [a, b)
    // 非再帰のアイデア: http://d.hatena.ne.jp/komiyam/20131202/1385992406
    MonoidType query(int a, int b) {
        MonoidType vl = E0, vr = E0;
        for(int l=a+n, r=b+n; l<r; l>>=1, r>>=1) {
            if(l & 1) vl = cmb_f(vl, node[(l++)-1]);
            if(r & 1) vr = cmb_f(node[(--r)-1], vr);
        }
        return cmb_f(vl, vr);
    }
};

int main() {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;

    int N; cin >> N;
    vector< pair<int, int> > points;
    for(int i=0; i<N; i++) {
        int x, y; cin >> x >> y;
        bool ok = true;
        ok &= (min(x1, x2) <= x and x <= max(x1, x2));
        ok &= (min(y1, y2) <= y and y <= max(y1, y2));
        if(ok) points.emplace_back(x, y);
    }
    
    // x1 <= x2, y1 <= y2 にしたい
    if(x1 > x2) {
        x1 *= -1, x2 *= -1;
        for(auto &e : points) e.first *= -1;
    }
    if(y1 > y2) {
        y1 *= -1, y2 *= -1;
        for(auto &e : points) e.second *= -1;
    }

    if(x1 == x2) {
        long double ans = ((x2 - x1) + (y2 - y1)) * 100LL;
        long double loss = 20 * acos(-1) / 2 - 20;
        for(auto &e : points) {
            if(e.first == x1 and y1 <= e.second and e.second <= y2) {
                ans += loss;
            }
        }
        printf("%.12Lf\n", ans);
        return 0;
    }
    if(y1 == y2) {
        long double ans = ((x2 - x1) + (y2 - y1)) * 100LL;
        long double loss = 20 * acos(-1) / 2 - 20;
        for(auto &e : points) {
            if(e.second == y1 and x1 <= e.first and e.first <= x2) {
                ans += loss;
            }
        }
        printf("%.12Lf\n", ans);
        return 0;
    }

    N = points.size();
    sort(points.begin(), points.end());

    if(N == 0) {
        cout << ((x2 - x1) + (y2 - y1)) * 100LL << endl;
        return 0;
    }
    
    int K = 1; while(K < N) K <<= 1;
    vector< SegmentTree<int> > segs(2*K-1);
    vector< vector<int> > vecs(2*K-1);
    while(points.size() < K) points.emplace_back(INF, INF);
    
    auto build = [&](auto &&self, int l, int r, int k) -> void {
        segs[k] = SegmentTree<int>(r-l, 0,
                                   [](int a, int b) { return max(a, b); },
                                   [](int a, int b) { return max(a, b); });
        for(int i=l; i<r; i++) vecs[k].emplace_back(points[i].second);
        sort(vecs[k].begin(), vecs[k].end());

        if(r - l >= 2) {
            int mid = (l + r) / 2;
            self(self, l, mid, 2*k+1);
            self(self, mid, r, 2*k+2);
        }
    };
    build(build, 0, K, 0);

    auto update = [&](auto &&self, int k, int v) -> void {
        int X, Y; tie(X, Y) = points[k];
        k += K - 1;

        {
            int idx = lower_bound(vecs[k].begin(), vecs[k].end(), Y) - vecs[k].begin();
            segs[k].update(idx, v);
        }
        
        while(k > 0) {
            k = (k - 1) / 2;
            int idx = lower_bound(vecs[k].begin(), vecs[k].end(), Y) - vecs[k].begin();
            segs[k].update(idx, v);
        }
    };

    auto get_max = [&](auto &&self, int l, int r,
                       int x, int y, int k) -> int {        
        int lx = points[l].first, rx = points[r-1].first;
        if(x <= lx) {
            int idx = lower_bound(vecs[k].begin(), vecs[k].end(), y) - vecs[k].begin();
            return segs[k].query(idx, vecs[k].size());
        }
        else if(lx <= x and x <= rx) {
            int mid = (l + r) / 2;
            int v0 = self(self, l, mid, x, y, 2*k+1);
            int v1 = self(self, mid, r, x, y, 2*k+2);
            return max(v0, v1);
        }
        else {
            return 0;
        }
    };

    int max_val = 0;
    for(int i=N-1; i>=0; i--) {
        int X, Y; tie(X, Y) = points[i];
        int val = get_max(get_max, 0, K, X+1, Y+1, 0) + 1;
        chmax(max_val, val);
        update(update, i, val);
    }

    fprintf(stderr, "max_val = %d\n", max_val);
    long double gain = 20 - 20 * acos(-1) / 4;
    long double loss = 20 * acos(-1) / 2 - 20;

    if(min(x2 - x1, y2 - y1) + 1 == max_val) {
        fprintf(stderr, "corner\n");
        max_val--;
        printf("%.12Lf\n", ((x2 - x1) + (y2 - y1)) * 100LL - gain * max_val + loss);
    }
    else {
        printf("%.12Lf\n", ((x2 - x1) + (y2 - y1)) * 100LL - gain * max_val);
    }
    return 0;
}


Measured memory_bytes: 150768