#include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<sstream>
#include<unordered_map>
#include<unordered_set>
#include<vector>
using namespace std;
using uint = unsigned int;
using ll = long long;
const int M = 1e9 + 7;
const ll MLL = 1e18L + 9;
#pragma unused(M)
#pragma unused(MLL)
#ifdef LOCAL
#include"rprint.hpp"
#else
template <ostream& out = cout, class... T> void prints(T&&...){ }
template <ostream& out = cout, class... T> void printd(T&&...){ }
template <ostream& out = cout, class... T> void printde(T&&...){ }
template <ostream& out = cout, class... T> void printb(T&&...){ }
template <ostream& out = cout, class... T> void printArr(T&&...){ }
#endif

struct SegTree{
    SegTree *l, *r;
    int left, right;
    ll value = 0;
    SegTree(int size):SegTree(0, size - 1){ }
    SegTree(int st, int lt): left(st), right(lt){
        if(left == right){
            l = r = nullptr;
        }else{
            l = new SegTree(left, (right - left) / 2 + left);
            r = new SegTree((right - left) / 2 + left + 1, right);
        }
    }
    void set(int idx, ll val){
        if(right < idx || idx < left){ return; }
        value = max(value, val);
        if(left != idx || right != idx){
            l -> set(idx, val);
            r -> set(idx, val);
        }
    }
	ll getMax(int le, int re){
		if(right < le || re < left){ return 0; }
		if(le <= left && right <= re){
			return value;
		}
		return max(l -> getMax(le, re), r -> getMax(le, re));
	}
};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if(x1 > x2){
        swap(x1, x2);
        swap(y1, y2);
    }
    int n; cin >> n;
    vector<pair<int, int>> xys(n);
    vector<int> ys(n);
    for(int i = 0; i < n; i++){
        int x, y;
        cin >> x >> y;
        if(y1 > y2){
            y = -y;
        }
        xys[i] = {x, ys[i] = y};
    }
    if(y1 > y2){
        y1 = - y1;
        y2 = - y2;
    }
    if(x1 == x2 || y1 == y2){
        double add = 0;
        for(int i = 0; i < n; i++){
            if(min(x1, x2) <= xys[i].first && xys[i].first <=max(x1, x2) &&
               min(y1, y2) <= xys[i].second && xys[i].second <= max(y1, y2)){
                add += M_PI * 10 - 20;
            }
        }
        cout << fixed << setprecision(20) << (double)(abs(x1 - x2) + abs(y1 - y2)) * 100 + add << '\n';
        return 0;
    }
    unordered_map<int, int> mp;
    sort(ys.begin(), ys.end());
    for(int i = 0; i < n; i++){
        mp[ys[i]] = i;
    }
    sort(xys.begin(), xys.end());
    SegTree st(n);
    ll maxi = 0;
    for(int i = n - 1; i >= 0; i--){
        if(xys[i].first < x1 || x2 < xys[i].first || xys[i].second < y1 || y2 < xys[i].second){ continue; }
        int yy = mp[xys[i].second];
        ll v = st.getMax(yy, M);
        v++;
        prints(xys[i], yy, v);
        maxi = max(maxi, v);
        st.set(yy, v);
    }
    double add = 0;
    if(maxi == abs(x2 - x1) + 1 || maxi == abs(y2 - y1) + 1){
        maxi--;
        add = M_PI * 10 - 20;
    }
    cout << fixed << setprecision(20) << (double)(abs(x1 - x2) + abs(y1 - y2)) * 100 - maxi * (20 - M_PI * 5) + add << '\n';
    return 0;
}


Measured memory_bytes: 29640