object Main extends App {
	// your code goes here
	val num = io.StdIn.readLine().toInt
	val order = io.StdIn.readLine().split(" ").map(_.toInt)
	val manzoku = io.StdIn.readLine().split(" ").map(_.toInt)
	val up = io.StdIn.readLine().split(" ").map(_.toInt)
	val (t, _) = order.foldLeft((0, num))((t, o) => { 
		val u = if(t._2 + 1 == o){up(t._2 - 1)}else{0}
		(t._1 + manzoku(o -1 ) + u, o) })
	println(t)
}