N = read_line.to_i
A = read_line.split(" ").map &.to_i
B = read_line.split(" ").map &.to_i
C = read_line.split(" ").map &.to_i
acc = 0
A.each_with_index do |dish, i|
  acc += B[dish]
  if i > 0 && dish == A[i -1] + 1
  	acc += C[i - 1]
  end
end
acc