#include <bits/stdc++.h>

#ifndef LOCAL_
#define fprintf if( false ) fprintf
#endif // LOCAL_
#define dump() fprintf(stderr, "#%s.%d\n", __func__, __LINE__);
#define dumpl(x1) fprintf(stderr, "#%s.%d (%s) = (%ld)\n", __func__, __LINE__, #x1, x1);
#define dumpll(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%ld, %ld)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define dumplll(x1, x2, x3) fprintf(stderr, "#%s.%d (%s, %s, %s) = (%ld, %ld, %ld)\n", __func__, __LINE__, #x1, #x2, #x3, x1, x2, x3);
#define dumpd(x1) fprintf(stderr, "#%s.%d (%s) = (%lf)\n", __func__, __LINE__, #x1, x1);
#define dumpdd(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%lf, %lf)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define loop for(;;)
typedef std::vector<long> LI;
typedef std::queue<long> QI;
#define rep(i,n) for(long i = 0; i < (long)n; ++i)
const double pi = M_PI;
// const long mod = 1000000007;
const long mod = 1777777777;

template<typename T> void scan1(T& x) { fprintf(stderr, "unknown type\n"); }
template<> void scan1(long& x) { if( scanf("%ld", &x) < 0 ) exit(0); }
template<> void scan1(std::string& x) { if( not ( std::cin >> x ) ) exit(0); }
template<> void scan1(LI& xs) { for(long &x : xs) scan1(x); }
void scan() {}
template<typename Head, typename... Tail>
void scan(Head& x, Tail&... xs) {
  scan1(x); scan(xs...);
}

struct Solver {
   Solver() { fprintf(stderr, "--------Solver begin--------\n"); }
   ~Solver() { fprintf(stderr, "--------Solver end--------\n"); }
   void solve() {
      long x1, y1, x2, y2; scan(x1, y1, x2, y2);
      long n; scan(n);
      LI xs(n), ys(n);
      for(long i = 0; i < n; ++i) scan(xs[i], ys[i]);
      // case 1
      if( x1 == x2 ) {
         if( y1 > y2 ) std::swap(y1, y2);
         long z = 0;
         for(long i = 0; i < n; ++i) {
            if( xs[i] == x1 and y1 < ys[i] and ys[i] < y2 ) z += 1;
         }
         double res = 100 * (y2 - y1) - z * (2 * 10) + z * 2 * 10 * pi / 2;
         printf("%.20lf\n", res);
         return;
      }
      // case 2
      if( y1 == y2 ) {
         if( x1 > x2 ) std::swap(x1, x2);
         long z = 0;
         for(long i = 0; i < n; ++i) {
            if( ys[i] == y1 and x1 < xs[i] and xs[i] < x2 ) z += 1;
         }
         double res = 100 * (x2 - x1) - z * (2 * 10) + z * 2 * 10 * pi / 2;
         printf("%.20lf\n", res);
         return;
      }
      // case3
      // fix ... x1 < x2 and y1 < y2
      if( x1 > x2 ) {
         std::swap(x1, x2);
         std::swap(y1, y2);
      }
      if( y1 > y2 ) {
         y1 *= -1;
         y2 *= -1;
         for(long i = 0; i < n; ++i) {
            ys[i] *= -1;
         }
      }
      std::vector<std::pair<long, long>> ws;
      for(long i = 0; i < n; ++i) {
         if( x1 <= xs[i] and xs[i] <= x2 and y1 <= ys[i] and ys[i] <= y2 ) {
            ws.push_back(std::make_pair(ys[i], xs[i]));
         }
      }
      std::sort(ws.begin(), ws.end());
      std::set<long> set;
      for(auto yx : ws) {
         long x, y; std::tie(y, x) = yx;
         auto ite = set.upper_bound(x);
         if( ite == set.end() ) {
            set.insert(x);
         }
         else {
            set.erase(ite);
            set.insert(x);
         }
      }
      long z = set.size();
      double res = 100 * ((x2 - x1) + (y2 - y1)) - z * 10 * 2 + z * 2 * 10 * pi / 4;
      if( z == std::min(x2-x1+1, y2-y1+1) ) {
         res += 2 * 10 * pi / 4;
      }
      printf("%.20lf\n", res);
      dumpl((long)set.size());
   }
};

int main() {
   loop std::unique_ptr<Solver>(new Solver())->solve();
}



Measured memory_bytes: 16364