fun main(args: Array<String>){
	val n = readLine()!!.toInt()
	var array = readLine()!!.split(" ")
	val a = Array(array.size){
		array[it].toInt()
	}
	array = readLine()!!.split(" ")
	val b = Array(array.size){
		array[it].toInt()
	}
	array = readLine()!!.split(" ")
	val c = Array(array.size){
		array[it].toInt()
	}
	
	var result = 0
	for(i in 0 until n)
		result += b[a[i].toInt()-1]
	for(i in 1 until a.size)
		if( a[i] == a[i-1]+1 )
			result += c[a[i-1]-1]
	
	println(result)
}
