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 sum = 0
    var preIndex = -2
    for (a in A) {
        val curIndex = a - 1
        val point = B[curIndex]
        sum += point
        if (preIndex + 1 == curIndex) {
            sum += C[preIndex]
        }
        preIndex = a - 1
    }

    println(sum)

}