count = gets.to_i
count2 = count - 1
 
dishes = gets
satisfiedsB = gets
satisfiedsC = gets

dishes = dishes.split(' ')
satisfiedsB = satisfiedsB.split(' ')
satisfiedsC = satisfiedsC.split(' ')

time = 0
sum = 0
 
count.times do 
  time += 1
  if time == 1
    index = time - 1
    dish = dishes[index].to_i
    b_index = dish - 1
    b = satisfiedsB[b_index].to_i
    sum = sum + b
  else
    index = time - 1
    dish = dishes[index].to_i
    b_index = dish - 1
    b = satisfiedsB[b_index].to_i
    sum = sum + b
    
    before_index = index - 1
    before_dish = dishes[before_index].to_i
    
    if dish == before_dish + 1
      c_index = before_dish - 1
      c = satisfiedsC[c_index].to_i
      sum = sum + c
    end
  end
end
 
puts sum


