n = gets.to_i
a = gets.split.map(&:to_i)
a.map!{|i| i-=1}
b = gets.split.map(&:to_i)
c = gets.split.map(&:to_i)
before = 10000
sum = 0

a.each do |i|
    sum += b[i]
    sum += c[before] if i > before
    before = i
end

p sum