// #define DEBUGGING
#include <bits/stdc++.h>
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()
template <typename T> using V = std::vector<T>;
template <typename T> using VV = V<V<T>>;
using ll = std::int64_t;
using ull = std::uint64_t;
using PLL = std::pair<ll, ll>;
using TLL = std::tuple<ll, ll, ll>;
template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename T, typename... Tail> const T& var_min(const T &t, const Tail&... tail) { return std::min(t, var_min(tail...)); }
template <typename T, typename... Tail> const T& var_max(const T &t, const Tail&... tail) { return std::max(t, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
template <typename T> const T& clamp(const T &t, const T &low, const T &high) { return std::max(low, std::min(high, t)); }
template <typename T> void chclamp(T &t, const T &low, const T &high) { return t = clamp(t, low, high); }
namespace init__ { struct InitIO { InitIO() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(30); } } init_io; }
#define mv_rec make_v(init, tail...)
template <typename T> T make_v(T init) { return init; }
template <typename T, typename... Tail> auto make_v(T init, size_t s, Tail... tail) { return V<decltype(mv_rec)>(s, mv_rec); }
#undef mv_rec
using namespace std;
#ifdef DEBUGGING
#include "../../debug/debug.cpp"
#else
#define DEBUG(...) 0
#define DEBUG_SEPARATOR_LINE 0
#endif

const ll MAXL = 1e8;
const ll inf = 5e15;

double solve() {
    ll x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    ll N;
    cin >> N;
    V<PLL> xy(N);
    for(auto &&ele : xy) {
        ll x, y;
        cin >> x >> y;
        ele = PLL(x, y);
    }

    if(x2 < x1) {
        swap(x1, x2);
        swap(y1, y2);
    }
    if(y2 < y1) {
        y1 = MAXL - y1;
        y2 = MAXL - y2;
        for(auto &&ele : xy) {
            ll x, y;
            tie(x, y) = ele;
            y = MAXL - y;
            ele = PLL(x, y);
        }
    }
    
    double dist = (x2 - x1) + (y2 - y1);
    dist *= 100;
    double d1 = 2 * 10;
    double d2 = 2 * 10 / 4 * M_PI;
    double diff = d1 - d2;

    {
        auto cpy = move(xy);
        xy.clear();
        for(auto &&ele : cpy) {
            ll x, y;
            tie(x, y) = ele;
            if(!(x1 <= x && x <= x2 &&
                 y1 <= y && y <= y2)) continue;
            xy.push_back(ele);
        }
    }

    sort(ALL(xy));
    V<ll> lcs(N + 10, inf);
    map<ll, ll> y2x;
    y2x[inf] = -1;
    for(auto &&ele : xy) {
        ll x, y;
        tie(x, y) = ele;
        y2x[y] = x;
        auto ite = lower_bound(ALL(lcs), y);
        *ite = y;
    }

    auto ite = lower_bound(ALL(lcs), inf);
    ll idx = distance(lcs.begin(), ite);
    bool cx = y2x[lcs[0]] == x1;
    bool cy = lcs[0] == y1;
    ll px = x1, py = y1;
    for(ll i = 1; i < idx; i++) {
        ll y = lcs[i];
        ll x = y2x[y];
        if(px + 1 != x) cx = false;
        if(py + 1 != y) cy = false;
        px = x;
        py = y;
    }
    if(px != x2) cx = false;
    if(py != y2) cy = false;

    double ans = dist - idx * diff;
    if(cx || cy) ans += d2;
    return ans;
}

int main() {
    cout << solve() << endl;
    return 0;
}


Measured memory_bytes: 18228