n = $stdin.gets.chomp.to_i
a = $stdin.gets.chomp.split(" ")
a.map! do |a_j|
a_j.to_i
end
b = $stdin.gets.chomp.split(" ")
b.map! do |a_j|
a_j.to_i
end
c = $stdin.gets.chomp.split(" ")
c.map! do |a_j|
a_j.to_i
end

ans = 0

for i in 1..n - 1
    if a[i] == a[i - 1] + 1
        ans += c[a[i - 1] - 1]
    end

end

for i in 0..n - 1
    ans += b[i]
end

puts ans