#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;

/*
<url:>
問題文============================================================

=================================================================

解説=============================================================

================================================================
*/
typedef ll PD_Type;
const PD_Type PD_INF = 1 << 30;

struct Primal_Dual
{
    typedef pair< PD_Type, int > pii;
    
    struct edge
    {
        int to, rev;
        PD_Type    cap, cost;
        edge() {}
        edge(int to, PD_Type cap, PD_Type cost, int rev) :to(to), cap(cap), cost(cost), rev(rev) {}
        
    };
    vector< vector< edge > > graph;
    vector< int > prevv, preve;
    vector< PD_Type > potential, min_cost;
    Primal_Dual(int V) : graph(V) {}
    
    void add_edge(int from, int to, PD_Type cap, PD_Type cost)
    {
        graph[from].push_back(edge(to, cap, cost, (int)graph[to].size()));
        graph[to].push_back(edge(from, 0, -cost, (int)graph[from].size() - 1));
    }
    
    PD_Type min_cost_flow(int s, int t, int f)
    {
        int V = (int)graph.size();
        PD_Type ret = 0;
        priority_queue< pii, vector< pii >, greater< pii > > que;
        potential.assign(V, 0);
        preve.assign(V, -1);
        prevv.assign(V, -1);
        
        //一回だけbellmanfordで最初のポテンシャルを求める
        for(int k = 0; k < V; k++) {
            for(int i = 0;i < V;i++) {
                for(int j = 0; j < (int)graph[i].size(); j++) {
                    edge &e = graph[i][j];
                    if (e.cap == 0)continue; // 誤差注意
                    potential[e.to] = min(potential[e.to], potential[i] + e.cost);
                }
            }
        }
        
        while (f > 0) {
            min_cost.assign(V, PD_INF);
            que.push(pii(0, s));
            min_cost[s] = 0;
            
            while (!que.empty()) {
                pii p = que.top();
                que.pop();
                if (min_cost[p.second] < p.first) continue;
                for (int i = 0; i < (int)graph[p.second].size(); i++) {
                    edge &e = graph[p.second][i];
                    PD_Type nextCost = min_cost[p.second] + e.cost + potential[p.second] - potential[e.to];
                    if (e.cap > 0 && min_cost[e.to] > nextCost) {
                        min_cost[e.to] = nextCost;
                        prevv[e.to] = p.second; preve[e.to] = i;
                        que.push(pii(min_cost[e.to], e.to));
                    }
                }
            }
            if (min_cost[t] == PD_INF) return -1;
            for (int v = 0; v < V; v++) potential[v] += min_cost[v];
            PD_Type addflow = f;
            for (int v = t; v != s; v = prevv[v]) {
                addflow = min(addflow, graph[prevv[v]][preve[v]].cap);
            }
            f -= addflow;
            ret += addflow * potential[t];
            for (int v = t; v != s; v = prevv[v]) {
                edge &e = graph[prevv[v]][preve[v]];
                e.cap -= addflow;
                graph[v][e.rev].cap += addflow;
            }
        }
        return ret;
    }
};


int main(void) {
    cin.tie(0); ios::sync_with_stdio(false);
    int M,N,K; cin >> M >> N >> K;
    Primal_Dual F(K);
    
    int res = 0;
    vector<int> A(N);
    vector<vector<int> > B(N);
    for(int i = 0; i < N;i++) cin >> A[i];
    for(int i = 0; i < K;i++){
        int a; cin >> a; a--;
        B[a].push_back(i);
        res += A[a];
    }
    
    for(int i = 0; i < N;i++){
        if((int)B[i].size() <= 1) continue;
        for(int j = 0; j < (int)B[i].size()-1;j++){
            int s = B[i][j], t = B[i][j+1];
            if(s+1 != t){
                F.add_edge(s+1, t, 1, -A[i]);
            }else{
                res -= A[i];
            }
        }
    }
    for(int i = 0; i < K-1;i++){
        F.add_edge(i, i+1, M, 0);
    }
    cout << res + F.min_cost_flow(0, K-1, M-1) << endl;
    return 0;
}



Measured memory_bytes: 4964