#include <bits/stdc++.h>
using namespace std;
#define int long long
using ll=long long;
using vi=vector<int>;
using vl=vector<long long>;
using pii=pair<int,int>;
using pll=pair<long long,long long>;
#define ITR(i,c) for(auto i=begin(c);i!=end(c);++i)
#define FORE(x,c) for(auto &x:c)
#define REPF(i,a,n) for(int i=a,i##len=(int)(n);i<i##len;++i)
#define REP(i,n) REPF(i,0,n)
#define REPR(i,n) for(int i=(int)(n);i>=0;--i)
#define REPW(i,n) for(i=0;i<(int)(n);++i)
#define ALL(c) begin(c),end(c)
#define RALL(c) rbegin(c),rend(c)
#define SZ(c) ((int)c.size())
#define CONTAIN(c,x) (c.find(x)!=end(c))
#define OUTOFRANGE(y,x,h,w) (y<0||x<0||y>=h||x>=w)
#define dump(...)
const int DX[9]={0,1,0,-1,1,1,-1,-1,0},DY[9]={-1,0,1,0,-1,1,1,-1,0};
#define INF (1001001001)
#define INFLL (1001001001001001001ll)
template<class T> ostream& operator << (ostream &os,const vector<T> &v) {
    ITR(i,v) os << *i << (i==end(v)-1 ? "" : "\n"); return os; }
template<class T> istream& operator >> (istream &is,vector<T> &v) {
    ITR(i,v) is >> *i; return is; }
template<class T> istream& operator >> (istream &is, pair<T,T> &p) {
        is >> p.first >> p.second; return is; }
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a,const T &b){if(b<a){a=b;return 1;}return 0;}
//------------------------------------------------------------------------------
struct before_main_function {
    before_main_function() {
        #ifdef int
            #undef INF
            #define INF INFLL
            #define stoi stoll
        #endif
        cin.tie(0);ios::sync_with_stdio(false);
        cout<<setprecision(15)<<fixed;
        #define endl "\n"
    }
} before_main_function;
//------------------8<------------------------------------8<--------------------

struct RMQ {
    int n;
    vector<int> data;
    RMQ(int n_=0) {
        n=1;
        while(n<n_) n<<=1;
        data.resize(n<<1,0);
    }
    void update(int i,int x) {
        i+=n-1;
        data[i]=x;
        while(i>0) {
            i=(i-1)/2;
            data[i]=max(data[i*2+1],data[i*2+2]);
        }
    }
    int getmax(int a,int b) {
        return getmax(a,b,0,0,n);
    }
    int getmax(int a,int b,int k,int l,int r) {
        if(r<=a or b<=l) return 0;
        if(a<=l and r<=b) return data[k];
        int ml=getmax(a,b,k*2+1,l,(r+l)/2);
        int mr=getmax(a,b,k*2+2,(r+l)/2,r);
        return max(ml,mr);
    }
};

const long double PI = acos(-1);
signed main() {
    int x1,y1,x2,y2,n;
    cin>>x1>>y1>>x2>>y2>>n;

    vector<pii> p;
    REP(i,n) {
        int x,y;
        cin>>x>>y;
        if(min(x1,x2)<=x && min(y1,y2)<=y && x<=max(x1,x2) && y<=max(y1,y2)) {
            p.push_back({abs(x1-x),abs(y1-y)});
        }
    }

    int m=SZ(p);
    if(m==0) {
        cout<<(abs(x2-x1)+abs(y2-y1))*100<<endl;
        return 0;
    }

    if(x1==x2 || y1==y2) {
        int t=(abs(x1-x2)+abs(y1-y2))*100;
        cout<<(t+(10*PI-20)*m)<<endl;
        return 0;
    }

    sort(ALL(p));
    map<int,int> idx;
    REP(i,m) {
        idx[p[i].second]=0;
    }
    FORE(x,idx) {
        static int cnt=0;
        x.second=cnt++;
    }

    RMQ rmq(m+1);
    vector<int> dp(m,0);
    REP(i,m) {
        dp[i]=rmq.getmax(0,idx[p[i].second])+1;
        rmq.update(idx[p[i].second],dp[i]);
    }
    int k=rmq.getmax(0,m+1);

    if(min(abs(x1-x2),abs(y1-y2))+1==k) {
        int t=(abs(x1-x2)+abs(y1-y2))*100;
        cout<<(t+(5*PI-20)*(k-1)-20+10*PI)<<endl;
    } else {
        int t=(abs(x1-x2)+abs(y1-y2))*100;
        cout<<(t+(5*PI-20)*k)<<endl;
    }
    return 0;
}


Measured memory_bytes: 22380