#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using u64 = uint_fast64_t;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007;
//constexpr long long MOD = 998244353;
template<class T1, class T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return true;} return false; }
template<class T1, class T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return true;} return false; }
inline int popcount(int x) {return __builtin_popcount(x);}
inline int popcount(long long x) {return __builtin_popcountll(x);}
void print() { cout << "\n"; }
template<class T, class... Args>
void print(const T &x, const Args &... args) {
    cout << x << " ";
    print(args...);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////

using DD = long double;
const DD PI = acos(DD(-1));

template<typename T>
struct Compress {
    vector<T> xs;

    Compress(){};
    Compress(const vector<T> &vs) {add(vs);}
    Compress(const initializer_list<vector<T>> &vs) {for(auto &p : vs) add(p);}

    void add(const vector<T> &vs) {copy(begin(vs), end(vs), back_inserter(xs));}
    void add(const T &x) {xs.emplace_back(x);}

    int build() {
        sort(begin(xs), end(xs));
        xs.erase(unique(begin(xs), end(xs)), end(xs));
        return (int)xs.size();
    }

    vector<int> get(const vector<T> &vs) const {
        vector<int> ret;
        transform(begin(vs), end(vs), back_inserter(ret), [&](const T &x) {
            return lower_bound(begin(xs), end(xs), x) - begin(xs);
        });
        return ret;
    }

    int get(const T &x) const {return lower_bound(begin(xs), end(xs), x) - begin(xs);}

    const T &operator[](int k) const {return xs[k];}
};

template<typename T, typename Monoid>
struct SegmentTree {
    T unity;
    Monoid merge;
    int N;
    vector<T> node;

    SegmentTree(Monoid f, T id) : merge(f), unity(id) {}

    void init(int sz) {
        N = 1;
        while (N < sz) N *= 2;
        node.assign(2*N,unity);
    }

    void set(int k, const T &val) {node[k+N] = val;}

    void build() {
        for (int i = N-1; i > 0; --i) {
            node[i] = merge(node[i<<1|0], node[i<<1|1]);
        }
    }

    // (0-indexed)
    void update(int x, T val) {
        x += N;
        node[x] = val;
        while (x > 1) {
            x >>= 1;
            node[x] = merge(node[x<<1|0], node[x<<1|1]);
        }
    }

    // [l, r) (0-indexed)
    T get(int l, int r) {
        if (l >= r) return unity;
        T resl = unity, resr = unity;
        l += N; r += N;
        while (l < r) {
            if (l & 1) resl = merge(resl, node[l++]);
            l >>= 1;
            if (r & 1) resr = merge(node[--r], resr);
            r >>= 1;
        }
        return merge(resl, resr);
    }

    T operator[](int x) {return node[x+N];}
};

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);
    cout << fixed << setprecision(20);
    int x1,y1,x2,y2; cin >> x1 >> y1 >> x2 >> y2;
    int N; cin >> N;
    vector<int> X(N),Y(N);
    rep(i,N) cin >> X[i] >> Y[i];

    if (x1==x2) {
        if (y1 > y2) swap(y1,y2);
        DD ans = y2-y1;
        ans *= 100;
        rep(i,N) {
            if (X[i]==x1 and y1 < Y[i] and Y[i] < y2) ans += PI*10-20;
        }
        cout << ans << ln;
        return 0;
    }
    if (y1==y2) {
        if (x1 > x2) swap(x1,x2);
        DD ans = x2-x1;
        ans *= 100;
        rep(i,N) {
            if (Y[i]==y1 and x1 < X[i] and X[i] < x2) ans += PI*10-20;
        }
        cout << ans << ln;
        return 0;
    }

    if (x1 > x2) {
        swap(x1,x2);
        swap(y1,y2);
    }
    vector<int> x,y;
    set<int> dicx, dicy;
    auto f=[](int a, int b) {return max(a,b);};
    const int id = 0;
    SegmentTree seg(f,id);
    if (y1 > y2) {
        rep(i,N) {
            if (x1 <= X[i] and X[i] <= x2 and y2 <= Y[i] and Y[i] <= y1) {
                x.emplace_back(X[i]);
                y.emplace_back(Y[i]);
                dicx.emplace(X[i]);
                dicy.emplace(Y[i]);
            }
        }
        N = x.size();
        int flag = 0;
        int ok = 1;
        for (int i = x1; i <= x2; i++) {
            if (!dicx.count(i)) {
                ok = 0;
                break;
            }
        }
        if (ok) flag = 1;
        ok = 1;
        for (int i = y2; i <= y1; i++) {
            if (!dicy.count(i)) {
                ok = 0;
                break;
            }
        }
        if (ok) flag = 1;
        vector<int> idx(N);
        iota(all(idx),0);
        sort(all(idx),[&](int i, int j){return x[i] < x[j];});
        Compress<int> Com(y);
        Com.build();
        seg.init(N);
        seg.build();
        rep(i,N) {
            int u = idx[i];
            if (i) {
                int v = idx[i-1];
                if (y[v] < y[u]) flag = 0;
            }
            int cy = Com.get(y[u]);
            int val = seg.get(cy,N);
            seg.update(cy,val+1);
        }
        DD ans = (x2-x1)+(y1-y2);
        ans *= 100;
        int val = seg.get(0,N);
        if (flag) {
            val--;
            ans += PI*10-20;
        }
        ans += (PI*5-20)*val;
        cout << ans << ln;
    } else {
        rep(i,N) {
            if (x1 <= X[i] and X[i] <= x2 and y1 <= Y[i] and Y[i] <= y2) {
                x.emplace_back(X[i]);
                y.emplace_back(Y[i]);
                dicx.emplace(X[i]);
                dicy.emplace(Y[i]);
            }
        }
        N = x.size();
        int flag = 0;
        int ok = 1;
        for (int i = x1; i <= x2; i++) {
            if (!dicx.count(i)) {
                ok = 0;
                break;
            }
        }
        if (ok) flag = 1;
        ok = 1;
        for (int i = y1; i <= y2; i++) {
            if (!dicy.count(i)) {
                ok = 0;
                break;
            }
        }
        if (ok) flag = 1;
        vector<int> idx(N);
        iota(all(idx),0);
        sort(all(idx),[&](int i, int j){return x[i] < x[j];});
        Compress<int> Com(y);
        Com.build();
        seg.init(N);
        seg.build();
        rep(i,N) {
            int u = idx[i];
            if (i) {
                int v = idx[i-1];
                if (y[v] > y[u]) flag = 0;
            }
            int cy = Com.get(y[u]);
            int val = seg.get(0,cy);
            seg.update(cy,val+1);
        }
        DD ans = (x2-x1)+(y2-y1);
        ans *= 100;
        int val = seg.get(0,N);
        if (flag) {
            val--;
            ans += PI*10-20;
        }
        ans += (PI*5-20)*val;
        cout << ans << ln;
    }
}


Measured memory_bytes: 28776