fun main(args: Array<String>){
    readLine()
    //var N = inputs[0].toInt()
    var A = readLine()!!.split(" ").map(String::toInt)
    var B = readLine()!!.split(" ").map(String::toInt)
    var C = readLine()!!.split(" ").map(String::toInt)


    var satisfaction = 0
    for ((index, currentDish) in A.withIndex()) {
        satisfaction += B[currentDish - 1]
        
        if(index != 0) {
            var preDish = A[index-1]
            if(currentDish - preDish == 1)
                satisfaction += C[preDish - 1]
        }
    }

    println(satisfaction)
}