import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.StreamTokenizer
import java.util.*

//val random = Random()

fun main( args: Array<String> ) {
//    while ( true ) {
        solve()
//    }
}

//val MAX_C = 100

fun solve() {
    val st = StreamTokenizer( BufferedReader( InputStreamReader( System.`in` ) ) )
    var x1 = st.nextInt()
    var y1 = st.nextInt()
    var x2 = st.nextInt()
    var y2 = st.nextInt()
    val n = st.nextInt()
//    var x1 = random.nextInt( MAX_C )
//    var y1 = random.nextInt( MAX_C )
//    var x2 = random.nextInt( MAX_C )
//    var y2 = random.nextInt( MAX_C )
//    val n = random.nextInt( MAX_C )
    val x = IntArray( n )
    val y = IntArray( n )
    for ( i in 0 until n ) {
        x[i] = st.nextInt() * if ( x1 <= x2 ) 1 else -1
        y[i] = st.nextInt() * if ( y1 <= y2 ) 1 else -1
//        x[i] = random.nextInt( MAX_C ) * if ( x1 <= x2 ) 1 else -1
//        y[i] = random.nextInt( MAX_C ) * if ( y1 <= y2 ) 1 else -1
    }
    if ( x1 > x2 ) {
        x1 = -x1
        x2 = -x2
    }
    if ( y1 > y2 ) {
        y1 = -y1
        y2 = -y2
    }

//    for ( i in 0 until n ) {
//        if ( x[i] == x1 && y[i] == y1 ) return
//        if ( x[i] == x2 && y[i] == y2 ) return
//        for ( j in 0 until i ) {
//            if ( x[i] == x[j] || y[i] == y[j] ) return
//        }
//    }
//    println( "$x1 $y1 $x2 $y2 $n" )
//    for ( i in 0 until n ) {
//        println( "${x[i]} ${y[i]}")
//    }

    val inside = x.indices.filter { i -> x[i] in x1 .. x2 && y[i] in y1 .. y2 }
    val byX = inside.indices.sortedBy { x[inside[it]] }
    val Y = byX.map { y[inside[it]] }
    val byY = Y.indices.sortedBy { Y[it] }
    val yToPos = HashMap<Int, Int>()
    for ( i in byY.indices ) {
        yToPos[Y[i]] = i
    }
    val segTree = SegmentTree( Y.size )
    for ( i in Y.indices ) {
        val value = segTree.max( yToPos[Y[byY[i]]]!! ) + 1
        segTree.put( yToPos[Y[byY[i]]]!!, value )
    }
    val visit = segTree.max(Y.size + 1)
    val result = (Math.abs(x2 - x1) + Math.abs(y2 - y1)) * 100.0 +
            visit * 10.0 * (Math.PI / 2 - 2) +
            if (x2 - x1 + 1 == visit || y2 - y1 + 1 == visit ) 10 * Math.PI / 2 else 0.0
    println( result )


//    run {
//        val t = Array( x2 - x1 + 1, { Array( y2 - y1 + 1, { Cell( false, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY ) } ) } )
//        inside.forEach { t[x[it] - x1][y[it] - y1].fount = true }
//        t[0][0].hor = 0.0
//        t[0][0].vert = 0.0
//        for ( xx in t.indices ) {
//            for ( yy in t[xx].indices ) {
//                if ( xx > 0 ) {
//                    t[xx][yy].hor = Math.min(
//                            t[xx - 1][yy].hor + if ( t[xx - 1][yy].fount ) 10 * ( Math.PI - 2 ) else 0.0,
//                            t[xx - 1][yy].vert + if ( t[xx - 1][yy].fount ) 10 * ( Math.PI / 2 - 2 ) else 0.0
//                            ) + 100
//                }
//                if ( yy > 0 ) {
//                    t[xx][yy].vert = Math.min(
//                            t[xx][yy - 1].vert + if ( t[xx][yy - 1].fount ) 10 * ( Math.PI - 2 ) else 0.0,
//                            t[xx][yy - 1].hor + if ( t[xx][yy - 1].fount ) 10 * ( Math.PI / 2 - 2 ) else 0.0
//                    ) + 100
//                }
//            }
//        }
//
//        t.forEach { it.forEach { c -> println( c ) } }
//
//        val naive = t.last().last().let { Math.min( it.vert, it.hor ) }
//        println( naive )
//
//        if ( Math.abs( result - naive ) > 1E-12 || Math.abs( result - naive ) / Math.max( Math.abs( result ), Math.abs( naive ) ) > 1E-12 ) {
//            throw RuntimeException()
//        }
//    }
}

data class Cell( var fount: Boolean, var hor: Double, var vert: Double )

class SegmentTree( size: Int ) {

    val s: Int = size.closest2Pow()
    val a: IntArray = IntArray( 2 * s )

    fun put( p: Int, value: Int ) {
        var c = s + p
        a[c] = value
        while ( c > 1 ) {
            c /= 2
            a[c] = Math.max( a[c * 2], a[c * 2 + 1] )
        }
    }

    fun max( until: Int ): Int {
        if ( until >= s ) return a[1]
        var m = 0
        var c = 1
        var l = 0
        var r = s
        while ( c * 2 < a.size ) {
            if ( l >= until ) break
            c *= 2
            val mid = ( l + r ) / 2
            if ( mid > until ) {
                r = mid
            } else {
                m = Math.max( m, a[c] )
                l = mid
                c ++
            }
        }
        return m
    }
}

private fun Int.closest2Pow(): Int {
    var r = 1
    while ( r < this ) r *= 2
    return r
}

private fun StreamTokenizer.nextInt(): Int {
    nextToken()
    return nval.toInt()
}


Measured memory_bytes: 127744