#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
#define fst first
#define snd second

/* clang-format off */
template <class T, size_t D> struct _vec { using type = vector<typename _vec<T, D - 1>::type>; };
template <class T> struct _vec<T, 0> { using type = T; };
template <class T, size_t D> using vec = typename _vec<T, D>::type;
template <class T> vector<T> make_v(size_t size, const T& init) { return vector<T>(size, init); }
template <class... Ts> auto make_v(size_t size, Ts... rest) { return vector<decltype(make_v(rest...))>(size, make_v(rest...)); }
template <class T> inline void chmin(T &a, const T& b) { if (b < a) a = b; }
template <class T> inline void chmax(T &a, const T& b) { if (b > a) a = b; }
/* clang-format on */

const double pi = acos(-1);
const ll L = 100000000ll - 1;

using P = pair<ll, ll>;

template <class I>
class SegmentTree {
 public:
  using Op = function<I(const I&, const I&)>;

 private:
  int n;
  vector<I> dat;
  Op op;
  I e;

 public:
  SegmentTree(int n_, const Op& op, const I& e)
      : op(op), e(e) {
    n = 1;
    while (n < n_) n *= 2;
    dat.resize(2 * n - 1, e);
  }
  SegmentTree(const vector<I>& init, const Op& op, const I& e)
      : SegmentTree(init.size(), op, e) {
    for (int i = 0; i < init.size(); i++) {
      dat[i + n - 1] = init[i];
    }
    for (int i = n - 2; i >= 0; i--) {
      dat[i] = op(dat[i * 2 + 1], dat[i * 2 + 2]);
    }
  }
  const I& operator[](int k) const {
    return dat[k + n - 1];
  }
  void update(int k, const I& a) {
    k += n - 1;
    dat[k] = a;
    while (k > 0) {
      k = (k - 1) / 2;
      dat[k] = op(dat[k * 2 + 1], dat[k * 2 + 2]);
    }
  }
  // [a, b)
  I query(int a, int b) const {
    a += n - 1;
    b += n - 1;
    I vl = e;
    I vr = e;
    while (a < b) {
      if ((a & 1) == 0) vl = op(vl, dat[a]);
      if ((b & 1) == 0) vr = op(dat[b - 1], vr);
      a = a / 2;
      b = (b - 1) / 2;
    }
    return op(vl, vr);
  }
  // query(0, i) >= x となる最小のi
  int kth(const I& x) const {
    int k = 0;
    I v = e;
    while (k < n - 1) {
      I t = op(v, dat[k * 2 + 1]);
      if (x <= t) {
        k = k * 2 + 1;
      } else {
        v = t;
        k = k * 2 + 2;
      }
    }
    return k - (n - 1) + 1;
  }
};

int solve(vector<P> ps) {
  sort(ps.begin(), ps.end());
  map<ll, int> mp;
  for (auto& p : ps) mp[p.snd] = 0;
  int id = 0;
  for (auto& e : mp) e.snd = id++;
  SegmentTree<int> seg(id, [&](int a, int b) { return max(a, b); }, 0);
  for (auto& p : ps) {
    int y = mp[p.snd];
    seg.update(y, seg.query(0, y) + 1);
  }
  return seg.query(0, id);
}

int main() {
#ifdef DEBUG
  ifstream cin("in.txt");
#endif
  ll sx, sy, tx, ty;
  int N;
  while (cin >> sx >> sy >> tx >> ty >> N) {
    vector<P> ps(N);
    for (int i = 0; i < N; i++) cin >> ps[i].fst >> ps[i].snd;
    if (sx > tx) {
      for (auto& p : ps) p.fst = L - p.fst;
      sx = L - sx;
      tx = L - tx;
    }
    if (sy > ty) {
      for (auto& p : ps) p.snd = L - p.snd;
      sy = L - sy;
      ty = L - ty;
    }
    vector<P> qs;
    for (auto p : ps) {
      if (sx <= p.fst && p.fst <= tx && sy <= p.snd && p.snd <= ty) {
        qs.push_back(p);
      }
    }
    int mx = solve(qs);
    ll ub = min(tx - sx, ty - sy) + 1;
    double R = 20;
    double arc = 5 * pi;
    double base = ((tx - sx) + (ty - sy)) * 100;
    double res;
    if (mx == ub) {
      res = base - (R - arc) * (ub - 1) + (2 * arc - R);
    } else {
      res = base - (R - arc) * mx;
    }
    printf("%.20f\n", res);
  }
  return 0;
}


Measured memory_bytes: 26732