N = int(input())
eat_list = list(map(int, input().split()))
manzok_list = list(map(int, input().split()))
add_manzok_list = list(map(int, input().split()))

manzok = 0

for i in range(N):
 manzok += manzok_list[eat_list[i]-1]
 if(i > 0 and (eat_list[i] - eat_list[i-1]) == 1):
   print(i)
   manzok += add_manzok_list[eat_list[i-1]-1]

print(manzok)