#include "bits/stdc++.h"
using namespace std;
#define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i))
#define rep(i,j) FOR(i,0,j)
#define each(x,y) for(auto &(x):(y))
#define mp make_pair
#define MT make_tuple
#define all(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<": "<<(x)<<endl
#define smax(x,y) (x)=max((x),(y))
#define smin(x,y) (x)=min((x),(y))
#define MEM(x,y) memset((x),(y),sizeof (x))
#define sz(x) (int)(x).size()
#define rt return
using dbl = double;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;
/*
セグメント木を利用したRMQ
初期化 O(N)
クエリ O(log(N))

*/
template<class Val, class Cmp>
class DynamicRMQ {
    int n;
    Val init;
    vector<Val> dat;
    Cmp cmp;
    inline Val query(int a, int b, int k, int l, int r) {
        if (r <= a || b <= l) return init;
        if (a <= l&&r <= b) return dat[k];
        else {
            Val vl, vr;
            vl = query(a, b, k << 1, l, (l + r) >> 1);
            vr = query(a, b, (k << 1) | 1, (l + r) >> 1, r);
            return cmp(vl, vr) ? vl : vr;
        }
    }
public:
    DynamicRMQ() {}
    DynamicRMQ(int n_, Val init_) :n(1), init(init_) {
        for (; n<n_; n <<= 1);
        dat = vector<Val>(n << 1, init);
    }
    void update(int k, Val a) {
        k += n;
        dat[k] = a;
        while (k > 1) {
            k >>= 1;
            dat[k] = cmp(dat[k << 1], dat[(k << 1) | 1]) ? dat[k << 1] : dat[(k << 1) | 1];
        }
    }
    Val query(int a, int b) {
        return query(a, b, 1, 0, n);
    }
};

typedef DynamicRMQ<long long, less<long long> > RMinQ64;
typedef DynamicRMQ<long long, greater<long long> > RMaxQ64;
typedef DynamicRMQ<int, less<int> > RMinQ32;
typedef DynamicRMQ<int, greater<int> > RMaxQ32;

/**
10^8 x 10^8
100
1<=N<=2*10^5
縦、横、同じ座標はたかだか1個

4半球移動
できるだけしたい

半球移動
できるだけ避けたい
2点が同じ通りにある場合だけ使う

最長部分増加列(減少)
=> DP, セグメント木、RMQ
**/

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(20);

    int X1, Y1, X2, Y2, N;
    cin >> X1 >> Y1 >> X2 >> Y2 >> N;

    if (X1 == X2) {
        if (Y1 > Y2)swap(Y1, Y2);
        dbl ans = 100.0 * (Y2 - Y1);
        rep(i, N) {
            int x, y;
            cin >> x >> y;
            if (x == X1 && Y1 < y&&y < Y2)ans += 11.415926535897938;
        }
        cout << ans << endl;
    } else if (Y1 == Y2) {
        if (X1 > X2)swap(X1, X2);
        dbl ans = 100.0 * (X2 - X1);
        rep(i, N) {
            int x, y;
            cin >> x >> y;
            if (y == Y1 && X1 < x&&x < X2)ans += 11.415926535897938;
        }
        cout << ans << endl;
    } else {
        vi xs;
        vector<pii> p;

        // X1->X2
        if (X1 > X2) {
            swap(X1, X2);
            swap(Y1, Y2);
        }

        int miy = min(Y1, Y2), may = max(Y1, Y2);
        // Y1<Y2 or Y1>Y2 増加列、減少列
        rep(i, N) {
            int x, y;
            cin >> x >> y;

            // 矩形内に存在
            if (X1 <= x&&x <= X2&&miy <= y&&y <= may) {
                xs.push_back(x);
                if (Y1 < Y2) {
                    p.push_back({ y,x });
                } else {
                    p.push_back({ -y,x });
                }
            }
        }
        sort(all(xs));
        xs.erase(unique(all(xs)), end(xs));
        sort(all(p));

        if (sz(xs) == 0) {
            cout << (may - miy + X2 - X1) * 100.0 << endl;
        } else {
            int M = sz(xs);
            RMaxQ32 rmq(M, 0);

            rep(i, M) {
                int k = distance(xs.begin(), lower_bound(all(xs), p[i].second));
                rmq.update(k, rmq.query(0, k) + 1);
            }

            dbl ans = (may - miy + X2 - X1) * 100.0;
            int k = rmq.query(0, M);
            if (k == min(X2 - X1, may - miy) + 1) {
                ans -= (k - 1)*4.292036732051031;
                ans += 11.415926535897938;
            } else {
                ans -= k*4.292036732051031;
            }
            cout << ans << endl;
        }
    }
}


Measured memory_bytes: 5352