// Why am I so dumb? :c
#include<bits/stdc++.h>

#define pb push_back
#define mp make_pair

#define all(x) (x).begin(), (x).end()

#define fi first
#define se second

using namespace std;

typedef long long ll;

struct pt {
    /// Point structure for Int in C++
    int x, y;

    /// CONSTRUCTORS

    pt() : x(0), y(0) {}
    pt(int x, int y) : x(x), y(y) {}

    /// INPUT/OUTPUT

    void print() {
        printf("(%d, %d)", x, y);
    }

    void println() {
        print();
        printf("\n");
    }

    bool read() {
        return scanf("%d %d", &x, &y) == 2;
    }

    /// OPERATORS

    const pt operator +(pt other) {
        return pt(x + other.x, y + other.y);
    }

    const pt operator +(int c) {
        return pt(x + c, y + c);
    }

    const pt operator -(pt other) {
        return pt(x - other.x, y - other.y);
    }

    const pt operator -(int c) {
        return pt(x - c, y - c);
    }

    pt& operator +=(pt other) {
        x += other.x;
        y += other.y;
        return *this;
    }

    pt& operator +=(int c) {
        x += c; y += c;
        return *this;
    }

    pt& operator -=(pt other) {
        x -= other.x;
        y -= other.y;
        return *this;
    }

    pt& operator -=(int c) {
        x -= c; y -= c;
        return *this;
    }

    const pt operator *(int c) {
        return pt(x * c, y * c);
    }

    pt& operator *=(int c) {
        x *= c; y *= c;
        return *this;
    }

    const pt operator /(int c) {
        return pt(x / c, y / c);
    }

    pt& operator /=(int c) {
        x /= c; y /= c;
        return *this;
    }

    pt& operator =(pt other) {
        x = other.x;
        y = other.y;
        return *this;
    }

    /// FUNCTIONS

    ll distSq(pt p) {
        return (x - p.x) * 1ll * (x - p.x) + (y - p.y) * 1ll * (y - p.y);
    }

    double dist(pt p) {
        return sqrt(distSq(p));
    }

    double magnitude() {
        return dist(pt(0, 0));
    }

    int orient(pt a, pt b) {
        ll val = (a.y - y) * 1ll * (b.x - a.x) - (a.x - x) * 1ll * (b.y - a.y);

        if (val == 0) {
            return 0;
        }

        return (val < 0 ? -1 : 1);
    }
};

/// COMPARISON

const bool operator <(pt a, pt b) {return (a.x == b.x ? a.y < b.y : a.x < b.x);}
const bool operator >(pt a, pt b) {return b < a;}
const bool operator ==(pt a, pt b) {return (a.x == b.x && a.y == b.y);}
const bool operator <=(pt a, pt b) {return !(a > b);}
const bool operator >=(pt a, pt b) {return !(a < b);}
const bool operator !=(pt a, pt b) {return !(a == b);}

const double DI = 5.0 * acos(-1.0); 
const int INF = (int)1e9;
const bool SEND = 0;

vector<pt> arr;

pt pA, pB;

int n;

void initiate(vector<pt> &V, pt &p1, pt &p2) {
	if (p1.x > p2.x) {
		swap(p1, p2);
	}

	{
		vector<pt> tmp;

		for (pt p : V) {
			if (p1.x <= p.x && p.x <= p2.x && min(p1.y, p2.y) <= p.y && p.y <= max(p1.y, p2.y)) {
				tmp.pb(p);
			}
		}

		V = tmp;
	}

	pt tmp = p1;
	p1 = pt(0, 0);
	V.pb(p2);

	for (pt &p : V) {
		p -= tmp;

		if (p.y < 0) {
			p.y *= -1;
		}
	}
                  
	p2 = V.back();
	V.pop_back();
}

int LIS(vector<pt> &V) {
	vector<int> dp(V.size() + 1, (int)1e9);
	dp[0] = -(int)1e9;

	for (int i = 0; i < V.size(); ++i) {
		int ps = upper_bound(all(dp), V[i].y) - dp.begin();

		if (dp[ps - 1] < V[i].y && V[i].y < dp[ps]) {
			dp[ps] = V[i].y;
		}
	}

	int ret = V.size();

	while (dp[ret] == (int)1e9) {
		--ret;
	}

	return ret;
}

double calcFast() {	            
	double ret = -1e15;
	int lim = pB.x;

	for (int step = 0; step < 2; ++step) {		
		sort(all(arr));

        int cnt = 0;

        for (int i = 1; i < arr.size(); ++i) {
        	if (arr[i - 1].y < arr[i].y) {
        		++cnt;
        	}
        }

        if (cnt == lim) {
        	ret = lim * (20.0 - DI) + 20.0 - 2.0 * DI;
        	return 100.0 * (pB.x + pB.y) - ret;
        }
        else {
        	ret = max(ret, (20.0 - DI) * LIS(arr));
        }

		for (pt &p : arr) {
			swap(p.x, p.y);
		}

		lim = pB.x + pB.y - lim;
	}	

	return 100.0 * (pB.x + pB.y) - ret;
}

void solve() {
	pA.read();
	pB.read();                  	
	scanf("%d", &n);    

	for (int i = 1; i <= n; ++i) {
		pt p;
		p.read();         
		arr.pb(p);
	}

	initiate(arr, pA, pB);

	if (pB.x == 0 || pB.y == 0 || arr.empty()) {
		printf("%.12f\n", (pB.x + pB.y) * 100.0 + (DI * 2 - 20.0) * arr.size());
		return;
	}

	printf("%.12f\n", calcFast());             
}                         

int main() {
    int tt = 1;

    while (tt--) {
        solve();
    }

    return 0;
}

Measured memory_bytes: 4848