n = gets().to_i
ans = 0
a = gets.split(" ").map{|e|e.to_i}
gets.split(" ").map{|e|ans += e.to_i}
c = gets.split(" ").map{|e|e.to_i}

0.upto(n-2) do |i|
	if a[i]+1 == a[i+1] then 
		ans += c[a[i]-1]
	end
end

p(ans)