#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;

const ld PI = acosl(ld(-1));

int xa, ya, xb, yb;
int n;
pii a[200105];
map<int, int> have_on_hor, have_on_ver;

int t[800105];

void update(int v, int tl, int tr, int idx, int val) {
    if (tl == tr)
        t[v] = val;
    else {
        int tm = (tl + tr) >> 1;
        if (idx <= tm)
            update(v + v, tl, tm, idx, val);
        else
            update(v + v + 1, tm + 1, tr, idx, val);
        t[v] = max(t[v + v], t[v + v + 1]);
    }
}

int get(int v, int tl, int tr, int l, int r) {
    if (l > r) return 0;
    if (l == tl && r == tr)
        return t[v];
    int tm = (tl + tr) >> 1;
    return max(get(v + v, tl, tm, l, min(r, tm)), get(v + v + 1, tm + 1, tr, max(l, tm + 1), r));
}

int main()
{
    ios_base::sync_with_stdio(false);

    cin >> xa >> ya >> xb >> yb >> n;
    for (int i = 0; i < n; ++i) {
        cin >> a[i].first >> a[i].second;
        have_on_ver[a[i].first] = a[i].second + 1;
        have_on_hor[a[i].second] = a[i].first + 1;
    }

    if (xa == xb) {
        if (ya > yb) swap(ya, yb);
        int on_ver = have_on_ver[xa];
        ld ans = (yb - ya) * 100LL;
        if (on_ver && ya <= on_ver - 1 && on_ver - 1 <= yb)
            ans += -20 + 10 * PI;
        cout << setprecision(17) << fixed << ans << endl;
    } else if (ya == yb) {
        if (xa > xb) swap(xa, xb);
        int on_hor = have_on_hor[ya];
        ld ans = (xb - xa) * 100LL;
        if (on_hor && xa <= on_hor - 1 && on_hor - 1 <= xb)
            ans += -20 + 10 * PI;
        cout << setprecision(17) << fixed << ans << endl;
    } else {
        if (xa > xb) {
            xa = 99999999 - xa;
            xb = 99999999 - xb;
            for (int i = 0; i < n; ++i)
                a[i].first = 99999999 - a[i].first;
        }
        if (ya > yb) {
            ya = 99999999 - ya;
            yb = 99999999 - yb;
            for (int i = 0; i < n; ++i)
                a[i].second = 99999999 - a[i].second;
        }
        int m = 0;
        for (int i = 0; i < n; ++i)
            if (xa <= a[i].first && a[i].first <= xb && ya <= a[i].second && a[i].second <= yb)
                a[m++] = a[i];
        n = m;
        ld ans = (yb - ya + xb - xa) * 100LL;
        map<int, int> mp;
        mp[ya] = 1;
        mp[yb] = 1;
        for (int i = 0; i < n; ++i)
            mp[a[i].second] = 1;
        int ci = 0;
        for (pii x : mp)
            if (x.second)
                mp[x.first] = ci++;
        int origxa = xa;
        int origxb = xb;
        int origya = ya;
        int origyb = yb;
        ya = mp[ya];
        yb = mp[yb];
        for (int i = 0; i < n; ++i)
            a[i].second = mp[a[i].second];
        sort(a, a + n);
        for (int i = n - 1; i >= 0; --i) {
            int cur = get(1, 0, ci - 1, a[i].second, ci - 1);
            update(1, 0, ci - 1, a[i].second, cur + 1);
        }
        int cur = get(1, 0, ci - 1, 0, ci - 1);
        ans -= 5 * (4 - PI) * cur;
        if (cur == origxb - origxa + 1 || cur == origyb - origya + 1)
            ans += 5 * PI;
        //cerr << cur << " " << ci << endl;
        cout << setprecision(17) << fixed << ans << endl;
    }

    return 0;
}


Measured memory_bytes: 33024