  int ans = 0;
    rep(i, N){                                    
      cin >> A[i];
    }
     rep(i, N){
        cin >> B[i];
        ans += B[i];
    }
    rep(i, N){
        cin >> C[i];
    }
    rep(i, N-1){
    if(A[i+1]=A[i]+1)ans+=C[A[i]-1];
    }
    cout << ans;
    return 0;
}