let n=Int(readLine()!)!
let a=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}
let b=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}
let c=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

//let fil = a.filter { a.contains($0+1) }
var fil : [Int] = []
let sumb =  b.reduce(0, combine: +)
//let filc = c.filter { c[fil[$0]] }
var filc = 0
var i = 0
for i in 0..<a.count - 1 {
  if( a[i+1] - 1 == a[i] ) {
    fil.append(a[i])
  }
}

var j = 0
for j in 0..<fil.count {
  filc += c[fil[j] - 1]
}
  
print( sumb + filc )