def bb
    n = gets.chomp.to_i
    an = gets.chomp.split(/\s/).map{|x| x.to_i}
    bn = gets.chomp.split(/\s/).map{|x| x.to_i}
    cn = gets.chomp.split(/\s/).map{|x| x.to_i}

    sc = 0
    j0 = an[0]
    for i in 1..n
        j = an[i-1]
        sc += bn[j-1]
        next if i == 1
        if j == j0+1
            sc += cn[j0-1]
        end
        j0 = j
    end

    puts sc
end

bb