#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef long double D;
//typedef complex<D> P;
#define F first
#define S second
const ll MOD=1000000007;
//const ll MOD=998244353;

template<typename T,typename U>istream & operator >> (istream &i,pair<T,U> &A){i>>A.F>>A.S; return i;}
template<typename T>istream & operator >> (istream &i,vector<T> &A){for(auto &I:A){i>>I;} return i;}
template<typename T,typename U>ostream & operator << (ostream &o,const pair<T,U> &A){o<<A.F<<" "<<A.S; return o;}
template<typename T>ostream & operator << (ostream &o,const vector<T> &A){int i=A.size(); for(auto &I:A){o<<I<<(--i?" ":"");} return o;}

template <typename T>
struct SegmentTree{
  using F = function<T(T,T)>;
  int n;
  F f;
  T ti;
  vector<T> dat;

  SegmentTree(){}
  SegmentTree(F f,T ti):f(f),ti(ti){}

  void init(int n_){
    n=1;
    while(n<n_) n<<=1;
    dat.assign(n<<1,ti);
  }

  void build(const vector<T> &v){
    int n_=v.size();
    init(n_);
    for(int i=0;i<n_;i++) dat[n+i]=v[i];
    for(int i=n-1;i;i--)
      dat[i]=f(dat[(i<<1)|0],dat[(i<<1)|1]);
  }

  void set_val(int k,T x){
    dat[k+=n]=x;
    while(k>>=1)
      dat[k]=f(dat[(k<<1)|0],dat[(k<<1)|1]);
  }

  T query(int a,int b){
    if(a>=b) return ti;
    T vl=ti,vr=ti;
    for(int l=a+n,r=b+n;l<r;l>>=1,r>>=1) {
      if(l&1) vl=f(vl,dat[l++]);
      if(r&1) vr=f(dat[--r],vr);
    }
    return f(vl,vr);
  }

  template<typename C>
  int find(int st,C &check,T &acc,int k,int l,int r){
    if(l+1==r){
      acc=f(acc,dat[k]);
      return check(acc)?k-n:-1;
    }
    int m=(l+r)>>1;
    if(m<=st) return find(st,check,acc,(k<<1)|1,m,r);
    if(st<=l&&!check(f(acc,dat[k]))){
      acc=f(acc,dat[k]);
      return -1;
    }
    int vl=find(st,check,acc,(k<<1)|0,l,m);
    if(~vl) return vl;
    return find(st,check,acc,(k<<1)|1,m,r);
  }

  template<typename C>
  int find(int st,C &check){
    T acc=ti;
    return find(st,check,acc,1,0,n);
  }
};

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<fixed<<setprecision(12);
  pll s,g;
  cin>>s>>g;
  ll N;
  cin>>N;
  vector<pll> A(N);
  cin>>A;
  if(abs(g.S-s.S)>abs(g.F-s.F)){
    swap(s.F,s.S);
    swap(g.F,g.S);
    for(auto &I:A){swap(I.F,I.S);}
  }
  if(s>g){swap(s,g);}
  if(s.S>g.S){
    s.S*=-1;
    g.S*=-1;
    for(auto &I:A){I.S*=-1;}
  }
  const D PI=asin(1)*2;
  const D dif90=(PI/2-2)*10;
  const D dif180=(PI-2)*10;
  vector<ll> Y={s.S,g.S};
  for(auto &I:A){Y.push_back(I.S);}
  sort(A.begin(),A.end());
  sort(Y.begin(),Y.end());
  Y.erase(unique(Y.begin(),Y.end()),Y.end());
  auto idx=[&](ll a){return lower_bound(Y.begin(),Y.end(),a)-Y.begin();};
  pll ls={s.F,s.S-1};
  ll cnt=0;
  const ll INF=1e9;
  auto f=[](ll a,ll b){return max(a,b);};
  SegmentTree<ll> seg(f,-INF);
  seg.build(vector<ll>(Y.size(),-INF/2));
  seg.set_val(idx(s.S),0);
  for(auto &I:A){
    if(I.F<s.F || I.S<s.S || I.F>g.F || I.S>g.S){continue;}
    if(I.S==ls.S+1 && I.F>ls.F){cnt++; ls=I;}
    ll mx=seg.query(idx(s.S),idx(I.S)+1);
    seg.set_val(idx(I.S),mx+1);
  }
  ll dist=g.S-s.S+g.F-s.F; dist*=100;
  if(cnt==g.S-s.S+1){cout<<dif180+dif90*(cnt-1)+dist<<endl;}
  else{cout<<dif90*seg.query(idx(s.S),idx(g.S)+1)+dist<<endl;}


  return 0;
}


Measured memory_bytes: 10736