/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author aajisaka
 */

#include<bits/stdc++.h>

using namespace std;

void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

#define SPEED ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

using ll = long long;
using ull = unsigned long long;
using P = pair<ll, ll>;

constexpr long double PI = 3.14159265358979323846264338327950288L;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
// Segment Tree for query sum[a, b)
template<typename T>
class SegTree {
    using F = function<T(T, T)>;
    int N;
    vector<T> dat;
    const F f;  // merge monoids
    const T ID; // identity

    // RangeSumQuery:
    // auto f = [](ll a, ll b) { return a+b; };
    // auto ID = 0LL;

    // RangeMaximumQuery:
    // auto f = [](ll a, ll b) { return max(a, b); };
    // auto ID = 0LL;
    // (sometimes it should be LLONG_MIN)

    // RangeMinimumQuery:
    // auto f = [](ll a, ll b) { return min(a, b); };
    // auto ID = LLONG_MAX;

    // auto seg = SegTree<ll>(100000, f, ID);
public: SegTree(int n, const F f, const T& ID) : f(f), ID(ID) {
    N = 1;
    while(N < n) N *= 2;
    dat.resize(2*N-1, ID);
  }

public: void build(vector<T>& a) {
    int n = a.size();
    for(int i=0; i<n; i++) dat[i+N-1] = a[i];
    for(int i=N-2; i>=0; i--) dat[i] = f(dat[i*2+1], dat[i*2+2]);
  }

  // update k-th element
public: void update(int k, const T& a) {
    k += N-1;
    dat[k] = a;
    while(k > 0) {
      k = (k-1)/2;
      dat[k] = f(dat[k*2+1], dat[k*2+2]);
    }
  }

  // add k-th element by a
public: void add(int k, const T& a) {
    k += N-1;
    dat[k] = f(dat[k], a);
    while(k > 0) {
      k = (k-1)/2;
      dat[k] = f(dat[k*2+1], dat[k*2+2]);
    }
  }

  // return sum[a, b)
public: T query(int a, int b) {
    return query(a, b, 0, 0, N);
  }
public: T query(int a, int b, int k, int l, int r) {
    if (r <= a || b <= l) return ID;
    if (a <= l && r <= b) return dat[k];
    auto m = (l+r)/2;
    return f(query(a, b, k*2+1, l, m), query(a, b, k*2+2, m, r));
  }
};

class CFountainWalk {
public:
    void solve(istream& cin, ostream& cout) {
      SPEED;
      cout << setprecision(15) << fixed;
      ll x1, y1, x2, y2;
      cin >> x1 >> y1 >> x2 >> y2;
      if (x1 > x2) {
        swap(x1, x2);
        swap(y1, y2);
      }
      int n; cin >> n;
      ll minx = min(x1, x2);
      ll maxx = max(x1, x2);
      ll miny = min(y1, y2);
      ll maxy = max(y1, y2);
      double len = (abs(x1-x2)+abs(y1-y2))*100;

      // TODO: special part
      // x1==x2, y1==y2
      if (x1 == x2 || y1 == y2) {
        bool flag = false;
        rep(i, n) {
          int x, y; cin >> x >> y;
          if (x1 == x2 && x == x1 && miny <= y && y <= maxy) {
            flag = true;
            break;
          }
          if (y1 == y2 && y == y1 && minx <= x && x <= maxx) {
            flag = true;
            break;
          }
        }
        if (flag) {
          len += 10*PI - 20;
        }
        cout << len << endl;
        return;
      }
      vector<P> v;
      set<int> stx, sty;
      stx.insert(x1);
      stx.insert(x2);
      sty.insert(y1);
      sty.insert(y2);
      rep(i, n) {
        int x, y; cin >> x >> y;
        if (minx <= x && x <= maxx && miny <= y && y <= maxy) {
          v.emplace_back(x, y);
          stx.insert(x);
          sty.insert(y);
        }
      }
      sort(all(v));
      int idx = 0;
      unordered_map<int, int> mpy;
      for(auto e: sty) {
        mpy[e] = idx;
        idx++;
      }
      int ysize = idx;

      // RangeMaximumQuery:
      auto f = [](ll a, ll b) { return max(a, b); };
      auto ID = 0LL;
      auto seg = SegTree<ll>(ysize, f, ID);

      for(auto e: v) {
        debug(e.second, mpy[e.second]);
        int now = 0;
        if (y1 < y2) {
          now = seg.query(0, mpy[e.second]);
        } else {
          now = seg.query(mpy[e.second], ysize);
        }
        seg.update(mpy[e.second], now+1);
      }

      int cnt = seg.query(0, ysize);
      debug(cnt);

      double base = 20-5*PI;
      if (cnt == min(abs(x1-x2), abs(y1-y2)) + 1) {
        // special case
        len -= base*cnt;
        len += 5*PI;
        cout << len << endl;
        return;
      }

      cout << len - base*cnt << endl;
    }
};

signed main() {
  CFountainWalk solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}

Measured memory_bytes: 37540