fun main(args: Array<String>) {
    abc140b()
}

fun abc140b() {
    val n = readLine()!!.toInt()
    val eates = readLine()!!.split(" ").map { it.toInt() }
    val scores = readLine()!!.split(" ").map { it.toInt() }
    val bonus = readLine()!!.split(" ").map { it.toInt() }

    var sum = 0
    var beforeEat = -1
    for (i in eates.indices) {
        val eat = eates[i] - 1
        val score = scores[eat] + if (beforeEat != -1 && eat - beforeEat == 1) bonus[eat - 1] else 0
        beforeEat = eat

        sum += score
    }

    println(sum)
}
