fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val a_arr = readLine()!!.split(" ").map { it.toInt() }
    val b_arr = readLine()!!.split(" ").map { it.toInt() }
    val c_arr = readLine()!!.split(" ").map { it.toInt() }
    var ans = b_arr.sum()
    for(i in 0 until (n-1)) {
        if(a_arr[i] + 1 == a_arr[i+1]) {
            ans += c_arr[a_arr[i]-1]
        }
    }
    println(ans)
}