// #include <bits/stdc++.h>

#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

#if __cplusplus >= 201402L
#include <shared_mutex>
#endif

using namespace std;

pair<long long, long long> p[200000];

const double PI = 3.14159265358979323846;
const double R = 10.0;
const double quarter_circle = PI * R / 2;
const double edge = 100.0;

using PLL = pair<long long, long long>;
int dp[200000];

int binarySearch(int start, int end, int x) {
    while (start < end) {
        int mid = (start + end) / 2;
        if (dp[mid] == x)
            return mid;
        else if (dp[mid] > x) {
            end = mid;
        } else {
            start = mid + 1;
        }
    }
    return -start - 1;
}

int main() {
    long long x1, y1, x2, y2;
    scanf("%lld %lld %lld %lld", &x1, &y1, &x2, &y2);

    if (x1 > x2) {
        swap(x1, x2);
        swap(y1, y2);
    }

    long long y_min = min(y1, y2), y_max = max(y1, y2);

    // drop those not used
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n;) {
        scanf("%lld %lld", &p[i].first, &p[i].second);
        if (p[i].first < x1 || p[i].first > x2 || p[i].second < y_min || p[i].second > y_max) {
            n--;
        } else {
            ++i;
        }
    }

    // x1 <= x2
    double res = edge * (x2 - x1 + y_max - y_min);
    sort(p, p + n, [&](const PLL& a, const PLL& b) { return a.first < b.first; });
    if (y1 > y2) {
        for (int i = 0; i < n; ++i) {
            p[i].second = -p[i].second;
        }
    }

    int len = 0;
    for (int i = 0; i < n; ++i) {
        int idx = binarySearch(0, len, p[i].second);
        if (idx < 0) idx = -(idx + 1);
        dp[idx] = p[i].second;
        if (idx == len) len++;
    }

    int max_corner = min(x2 - x1, y_max - y_min);

    if (len < max_corner + 1)
        res += len * (quarter_circle - 2 * R);
    else
        res += max_corner * (quarter_circle - 2 * R) + (2 * quarter_circle - 2 * R);

    printf("%.15f\n", res);

    return 0;
}

Measured memory_bytes: 4096