fun main() {
    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 ans=0
    var bef=-1
    for (i in 0 until n){
        val now =a[i]-1
        if (bef!=-1 && now-bef==1){
            ans+=c[bef]
        }
        ans+=b[now]
        bef=now
    }
    println(ans)
}