<?php
  class Scanner {
    private $arr = [];
    private $count = 0;
    private $pointer = 0;
    public function next() {
        if($this->pointer >= $this->count) {
            $str = trim(fgets(STDIN));
            $this->arr = explode(' ', $str);
            $this->count = count($this->arr);
            $this->pointer = 0;
        }
        $result = $this->arr[$this->pointer];
        $this->pointer++;
        return $result;
    }
    public function hasNext() {
        return $this->pointer < $this->count;
    }
    public function nextInt() {
        return (int)$this->next();
    }
    public function nextDouble() {
        return (double)$this->next();
    }
}

$sc = new Scanner();

$n = $sc->nextInt();
$a_arr = $sc->next();
$b_arr = $sc->next();
$c_arr = $sc->next();

$sum = 0;
for($i = 0; $i < $n; $i++){
  $sum += $b_arr[$a_arr[i] - 1];
  if($i > 0 && $a_arr[i-1] + 1 == $a_arr[i]){
    $sum += $c_arr[i - 1];
  }
}

echo($sum);