const lineList = require('fs').readFileSync('/dev/stdin','utf8').trim().split('\n')

const n = parseInt(lineList[0])
const a = lineList[1].split(' ').map(e => parseInt(e) - 1)
const b = lineList[2].split(' ').map(e => parseInt(e))
const c = lineList[3].split(' ').map(e => parseInt(e))

var scores = 0
var lastTimeMenu = 19 // init value is except (-1 <= lastTimeMenu <= 18)
for(var i=0;i<a.length;i++) {
  scores += b[a[i]]

  if(lastTimeMenu+1 === a[i]) {
    scores += c[lastTimeMenu]
  }

  lastTimeMenu = a[i]
}

console.log(scores)
