#include <bits/stdc++.h>
#include <ostream>

#define getNum(i) scanf("%d", &(i))
#define MODULO 1000000007l
#define INF 100000000
#define FOR(i,j,k) for(int (i)=(j);(i)<=(k);(i)++)
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

using namespace std;

const double PI = acos(-1);
const double CC = 5.0*PI - 20;
const double EXC = 10.0*PI - 20;

struct PT {
    int x, y;

    PT() {}

    PT(int x, int y) : x(x), y(y) {}

    bool operator<(const PT &rhs) const {
        if (x < rhs.x)
            return true;
        if (rhs.x < x)
            return false;
        return y < rhs.y;
    }

    bool operator>(const PT &rhs) const {
        return rhs < *this;
    }

    bool operator<=(const PT &rhs) const {
        return !(rhs < *this);
    }

    bool operator>=(const PT &rhs) const {
        return !(*this < rhs);
    }

    bool operator==(const PT &rhs) const {
        return x == rhs.x &&
               y == rhs.y;
    }

    bool operator!=(const PT &rhs) const {
        return !(rhs == *this);
    }

    friend ostream &operator<<(ostream &os, const PT &pt) {
        os << "x: " << pt.x << " y: " << pt.y;
        return os;
    }

    friend istream &operator>>(istream &is, PT &pt) {
        is >> pt.x >> pt.y;
        return is;
    }
};


typedef vector<int> VI;
typedef pair<int,int> PII;
typedef vector<PII> VPII;

#define STRICTLY_INCREASNG

VI LongestIncreasingSubsequence(VI v) {
    if (v.empty()) {
        return VI();
    }
    VPII best;
    VI dad(v.size(), -1);

    for (int i = 0; i < v.size(); i++) {
#ifdef STRICTLY_INCREASNG
        PII item = make_pair(v[i], 0);
        VPII::iterator iter = lower_bound(best.begin(), best.end(), item);
        item.second = i;
#else
        PII item = make_pair(v[i], i);
    VPII::iterator iter = upper_bound(best.begin(), best.end(), item);
#endif
        if (iter == best.end()) {
            dad[i] = (best.size() == 0 ? -1 : best.back().second);
            best.push_back(item);
        } else {
            dad[i] = dad[iter->second];
            *iter = item;
        }
    }

    VI ret;
    for (int i = best.back().second; i >= 0; i = dad[i])
        ret.push_back(v[i]);
    reverse(ret.begin(), ret.end());
    return ret;
}

int main() {

#ifdef CONTEST
    freopen("input.in", "r", stdin);
#endif
    IOS
    PT s, t;
    cin >> s >> t;
    if (s > t) swap(s, t);
    bool downward = s.y > t.y;
    if (downward) {
        s.y = 1e8 - s.y;
        t.y = 1e8 - t.y;
    }
    int n;
    cin >> n;
    vector<PT> fountains(n);
    FOR(i,0,n-1) {
        cin >> fountains[i];
        if (downward) fountains[i].y = 1e8 - fountains[i].y;
    }

    vector<PT> window;
    for (auto p : fountains) {
        if (p.x >= s.x && p.x <= t.x && p.y >= s.y && p.y <= t.y) {
            window.push_back(p);
        }
    }
    sort(window.begin(), window.end());
    vector<int> Y(window.size());
    for (int i = 0; i < window.size(); i++){
        Y[i] = window[i].y;
    }
    vector<int> LIS = LongestIncreasingSubsequence(Y);
    int k = LIS.size();
    double ans = 100.0*((t.y - s.y) + (t.x - s.x));
    if (k == 1+min(t.y-s.y, t.x-s.x)) {
        ans += EXC;
        ans += (k-1)*CC;
    } else {
        ans += k*CC;
    }

    cout << setprecision(20) << fixed << ans << endl;
}

Measured memory_bytes: 9072