#include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <sstream>
#include <string>
#include <map>
#include <set>
#include <stdlib.h>
#include <cmath>
#include <math.h>
#include <fstream>
#include <bitset>
#include <queue>
#include <ctime>
#define int long long
using namespace std;
struct Vertex{int dp;};
vector<Vertex> rmq;
double Pi = 3.14159265358979323;
int INF = 1e12;
vector<vector<int> > x_sort, y_sort;
void create_rmq(int i, int l, int r){
	if (r - l == 1){
		rmq[i].dp = 0;
	}
	else{
		int mid = (l + r) / 2;
		create_rmq(2*i+1, l, mid);
		create_rmq(2*i+2, mid, r);
		rmq[i].dp = 0;
	}
}
void add(int i, int l, int r, int ind, int value){
    if (r - l == 1){
		rmq[i].dp = value;
    }
    else{
		int mid = (l + r) / 2;
		if (ind < mid) add(2*i+1, l, mid, ind, value);
		else add(2*i+2, mid, r, ind, value);
		rmq[i].dp = max(rmq[2*i+1].dp, rmq[2*i+2].dp);
    }
}
int get(int i, int l, int r, int l1, int r1){
	if (l1 >= r1) return 0;
	if (l == l1 && r == r1) return rmq[i].dp;
	int mid = (l + r) / 2;
	return max(get(2*i+1, l, mid, l1, min(r1, mid)), get(2*i+2, mid, r, max(l1, mid), r1));
}
int32_t main(){
	int xf, yf, xs, ys, a, b;
	cout.precision(30);
	cin >> xf >> yf >> xs >> ys;
	vector<pair<int, int> > data;
	int n;
	cin >> n;
	for (int i=0; i < n; i++){
		cin >> a >> b;
		data.push_back(make_pair(a, b));
	}
	sort(data.begin(), data.end());
    if (xf > xs){
		swap(xf, xs);
		swap(yf, ys);
    }
    if (yf == ys){
		bool has = false;
        for (int i=0; i < data.size(); i++){
			if (data[i].second == yf && data[i].first > min(xf, xs) && data[i].first < max(xf, xs)){
                has = true;
			}
        }
        if (!has) cout << abs(xf - xs) * 100 << endl;
        else{
			double ans = abs(xf - xs) * 100;
			ans -= 20;
			ans += 10 * Pi;
			cout << ans << endl;
        }
        return 0;
    }
    if (xf == xs){
		bool has = false;
        for (int i=0; i < data.size(); i++){
			if (data[i].first == xf && data[i].second > min(yf, ys) && data[i].second < max(yf, ys)){
                has = true;
			}
        }
        if (!has) cout << abs(yf - ys) * 100 << endl;
        else{
			double ans = abs(yf - ys) * 100;
			ans -= 20;
			ans += 10 * Pi;
			cout << ans << endl;
        }
        return 0;
    }
    for (int i=0; i < data.size(); i++){
		if (xf <= data[i].first && xs >= data[i].first && min(yf, ys) <= data[i].second && max(yf, ys) >= data[i].second){
            vector<int> help, help1;
            help.push_back(data[i].first);
            help.push_back(i);
			help1.push_back(data[i].second);
            help1.push_back(i);
            x_sort.push_back(help);
            y_sort.push_back(help1);
		}
    }
    sort(x_sort.begin(), x_sort.end());
    sort(y_sort.begin(), y_sort.end());
    vector<int> go;
    for (int i=0; i < n; i++){
		go.push_back(-1);
    }
    int sz = y_sort.size();
    for (int i=0; i < sz; i++){
        go[y_sort[i][1]] = i;
    }
    for (int i=0; i < 4*sz; i++){
		Vertex v = {0};
		rmq.push_back(v);
    }
    if (sz == 0){
		cout << 100*abs(xf - xs) + 100*abs(yf - ys) << endl;
		return 0;
    }
    create_rmq(0, 0, sz);
    int mm = 0;
    for (int i=0; i < sz; i++){
        int ind = go[x_sort[i][1]];
		if (yf < ys){
            int gdp = get(0, 0, sz, 0, ind);
            add(0, 0, sz, ind, gdp+1);
            mm = max(mm, gdp+1);
		}
		else{
			int gdp = get(0, 0, sz, ind+1, sz);
            add(0, 0, sz, ind, gdp+1);
            mm = max(mm, gdp+1);
		}
    }
    bool lose = false;
    if ((mm == abs(xf-xs) + 1 || mm == abs(yf-ys) + 1)){
		mm--;
		lose = true;
    }
    double aa = 100* abs(xf - xs) + 100*abs(yf - ys) - 20 * mm;
	aa += 5 * Pi * mm;
	if (lose){
		aa -= 20;
		aa += 10 * Pi;
	}
	cout << aa << endl;
	return 0;
}


Measured memory_bytes: 44772