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 before = -1
    var result = 0
    for(x in 0..a.size-1){
        val i = a[x]
        result += b[i-1]
        if(i == before+1){
            result += c[before-1]
        }
        before = i
    }
    println(result)
}