#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;

typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007
#define MAX_N (1<<18)

#define PI ((long double)3.14159265358979323846)

struct SegTree {
  int seg[MAX_N*2-1];
  SegTree() {
    for (int i=0; i<MAX_N*2-1; i++) seg[i] = -INF;
  }

  void update(int i, int x) {
    i += MAX_N-1;
    if (seg[i] >= x) return;
    seg[i] = x;
    while (i > 0) {
      i = (i-1) / 2;
      seg[i] = max(seg[i*2+1], seg[i*2+2]);
    }
  }
  int query(int a, int b, int k=0, int l=0, int r=MAX_N) {
    if (r <= a || b <= l) return 0;
    if (a <= l && r <= b) return seg[k];
    return max(
      query(a, b, k*2+1, l, (l+r)/2),
      query(a, b, k*2+2, (l+r)/2, r)
    );
  }
};

#define MAX 99999999
int X1, Y1, X2, Y2;
int X[200000], Y[200000];
int N;
vector<int> xs, ys;

signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> X1 >> Y1 >> X2 >> Y2;
  if (X1 > X2) {
    swap(X1, X2);
    swap(Y1, Y2);
  }
  //cout<<"("<<X1<<","<<Y1<<") -> ("<<X2<<","<<Y2<<")\n";
  // X1 <= X2
  bool flip = (Y1 > Y2);
  if (flip) {
    Y1 = MAX-Y1;
    Y2 = MAX-Y2;
  }
  assert(X1 <= X2 && Y1 <= Y2);
  cin >> N;

  if (Y1 == Y2 || X1 == X2) {
    rep(i, N) {
      cin >> X[i] >> Y[i];
      if (flip) Y[i] = MAX-Y[i];
    }
    // yoko
    bool f = false;
    if (Y1 == Y2) {
      rep(i, N) if (Y[i] == Y1 && X1 <= X[i] && X[i] <= X2) f = true;
    }
    // tate
    else {
      rep(i, N) if (X[i] == X1 && Y1 <= Y[i] && Y[i] <= Y2) f = true;
    }
    long double ans = 100LL*(X2-X1 + Y2-Y1);
    if (f) ans += 10.0*PI - 20;
    cout << fixed << setprecision(20) << ans << "\n";
    return 0;
  }
  vector<P> ps;
  rep(i, N) {
    int x, y;
    cin >> x >> y;
    if (flip) y = MAX-y;
    if (x < X1 || x > X2) continue;
    if (y < Y1 || y > Y2) continue;
    xs.pb(x);
    ys.pb(y);
    ps.pb(P(x, y));
  }
  //xs.pb(X2);
  //ys.pb(Y2);
  sort(all(ps));
  sort(all(xs)); uniq(xs);
  sort(all(ys)); uniq(ys);
  rep(i, ps.size()) {
    //assert(lower_bound(all(xs), ps[i]._1) - xs.begin() == i);
    X[i] = ps[i]._1;
    Y[i] = lower_bound(all(ys), ps[i]._2) - ys.begin();
    //assert(Y[i] < MAX_N);
  }
  //int upper_x = lower_bound(all(xs), X2) - xs.begin();
  //int upper_y = lower_bound(all(ys), Y2) - ys.begin();
  //rep(i, ps.size()) cout<<Y[i]<<",";cout<<"\n";
  SegTree seg;
  seg.update(0, 0);
  int last_x = X1;
  rep(i, ps.size()) {
    //cout<<"["<<Y[i]<<"] <- "<<seg.query(0, Y[i]+1) +1<<"\n";
    seg.update(Y[i], seg.query(0, Y[i]+1) + 1);
  }
  int s = seg.query(0, MAX_N);
  //int s = seg.query(0, upper_y);
  //int ns = seg.query(upper_y, upper_y+1);
  long double ans = (X2-X1 + Y2-Y1)*100LL;
  if (s == X2-X1+1 || s == Y2-Y1+1) {
    s--;
    ans += 10.0*PI-20;
  }
  long double d = (20.0 - 5.0*PI)*(long double)s;
  // if (ns > 0) d = max(d, (long double)(20.0-5.0*PI)*(ns-1) - (10.0*PI-20));
  ans -= d;
  //if (s == X2-X1-1) ans += (10.0*PI-20);
  //cout<<"s="<<s<<"\n";
  cout << fixed << setprecision(20) << ans << "\n";
  return 0;
}


Measured memory_bytes: 7260