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

    var pre = -99
    var sti = 0
    for (i in 0 until N) {
        sti += B[A[i]-1]
        if (pre == A[i]-2) {
            sti += C[A[i]-2]
        }
        pre = A[i]-1
    }

    println(sti)
}