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

var ret = 0

for i in 0..<a.count {
  ret += b[a[i] - 1]
  if (i != 0) && (a[i] == a[i - 1] + 1) {
    ret += c[a[i - 1] - 1]
  }
}

print(ret)