#include <bits/stdc++.h>

using namespace std;

const int MAX_N = 200000;
const double PI = 3.141592653589793;
int a,b,c,d;
int n;
pair<int, int> f[MAX_N];

int main()
{
  cin >> a >> b >> c >> d >> n;
  if (a > c) { swap(a,c); swap(b,d); }

  for (int i = 0; i < n; ++i) {
    cin >> f[i].first >> f[i].second;
  }

  sort(f, f+n);
  int l = lower_bound(f, f+n, make_pair(a, 0)) - f;
  int r = upper_bound(f, f+n, make_pair(c, INT_MAX)) - f;

  if (l >= n) {
    printf("%.15f\n", 100.0*(abs(c - a) + abs(d - b)));
    return 0;
  }

  vector<int> bd;
  if (d < b) {
    swap(b, d);
    reverse(f+l, f+r);
  }
  for (int i = l; i < r; i++)
    if (b <= f[i].second && f[i].second <= d)
      bd.push_back(f[i].second);

  int lis[bd.size()];
  fill_n(lis, bd.size(), INT_MAX);
  for (int i = 0; i < bd.size(); i++) {
    *lower_bound(lis, lis+bd.size(), bd[i]) = bd[i];
  }

  int k = lower_bound(lis, lis+bd.size(), INT_MAX) - lis;

  int s = c - a + d - b, p, q;
  if (min(c - a, d - b) + 1 == k) {
    p = k-1;
    q = 1;
  } else {
    p = k;
    q = 0;
  }

  printf("%.15f\n", 100.0 * s + (5.0*p + 10.0*q) * PI - 20.0 * (p + q));

  return 0;
}
