n = gets.chomp.to_i

order = gets.chomp.split(" ").map(&:to_i)
cuisines = gets.chomp.split(" ").map(&:to_i)
bonus = gets.chomp.split(" ").map(&:to_i)

total = 0
order.each_with_index do |v, i|
    total += cuisines[v - 1]
    if order[i - 1] + 1 == order[i] and i > 0
        total += bonus[order[i - 1] - 1]
    end
end

puts total
