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() }

    println(B(n, A, B, C))
}

fun B(n: Int, a: List<Int>, b: List<Int>, c: List<Int>): Int {
    var manzoku = 0

    a.withIndex().forEach {
        manzoku += b[it.value-1]
        if (it.index != 0 && (a[it.index-1]+1 == a[it.index])) {
            manzoku += c[a[it.index-1] - 1]
        }
    }

    return manzoku
}