fun main(args : Array<String>) {
    val N = readLine()!!.toInt()
    val A = readLine()!!.split(" ").map { it.toInt() }
    val B = readLine()!!.split(" ").map { it.toInt() }
    val C = readLine()!!.split(" ").map { it.toInt() }

    var pre = -100
    var sum = 0
    A.forEach {
        val a = it - 1
        sum += B[a]
        if (a == pre + 1) {
           sum += C[pre]
        }
        pre = a
    }
    println(sum)
}