#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <set>
#include <cstring>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
#include <list>
#define INF 0x3f3f3f3f
#define EPS 10e-5
#define MAX_N 10010
#define MAX_K 10010

int lrsheet[MAX_N],lra[MAX_N],ks[MAX_N],wi[MAX_N];

//1 ≤ M ≤ 10
//1 ≤ N ≤ 104
//1 ≤ K ≤ 104
//1 ≤ wi ≤ 104
//1 ≤ aj ≤ N

const int dx[]={-1,0,0,1,0},dy[]={0,1,-1,0,0};
using namespace std;

int m,n,k;
int vCnt;

#define pb push_back
#define PB pop_back
#define bk back()
#define fs first
#define se second
#define sq(x) (x)*(x)
#define eps (1e-10)
#define INF (1000000300)
#define clr(x) memset((x),0,sizeof (x))
#define cp(a,b) memcpy((a),(b),sizeof (b))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<ll,int> D;


const int MAXV=1e4+300;
int V;
const int s=MAXV-1,t=MAXV-2;
struct EDGE{
    int to,cap,cost,next;
}ES[MAXV*10];
int eh;
int h[MAXV];
int dis[MAXV];
int prevv[MAXV],preve[MAXV];
int head[MAXV];
void addedge(int from,int to,int cap,int cost){
    ES[eh].to=to;ES[eh].cap=cap;ES[eh].cost=cost;
    ES[eh].next=head[from];head[from]=eh++;
    ES[eh].to=from;ES[eh].cap=0;ES[eh].cost=-cost;
    ES[eh].next=head[to];head[to]=eh++;
}
bool inq[MAXV];
ll min_cost_flow(int s,int t,int f){
    V=MAXV;//default V size maxed
    ll res=0;
    memset(h,0,sizeof h);
    queue<P> Q;////spfa计算势h
    fill(dis,dis+V,INF);
    dis[s]=0;
    Q.push(P(0,s));
    inq[s]=1;
    while(!Q.empty()){
        P p=Q.front();Q.pop();
        int v=p.se;
        inq[v]=0;
        for(int i=head[v];i!=-1;i=ES[i].next){
            EDGE &e=ES[i];
            if(e.cap>0&&dis[e.to]>dis[v]+e.cost+h[v]-h[e.to]){
                dis[e.to]=dis[v]+e.cost +h[v]-h[e.to];
                prevv[e.to]=v;
                preve[e.to]=i;
                if(!inq[e.to]) Q.push(P(dis[e.to],e.to)),inq[e.to]=1;
            }
        }
    }
    for(int v=0;v<V;v++)
        h[v]+=dis[v];
    while(f>0){
        priority_queue<P,vector<P> ,greater<P> >Q;////Dijkstra计算势h
        fill(dis,dis+V,INF);
        dis[s]=0;
        Q.push(P(0,s));
        while(!Q.empty()){
            P p=Q.top();Q.pop();
            int v=p.se;
            if(dis[v]<p.fs) continue;
            for(int i=head[v];i!=-1;i=ES[i].next){
                EDGE &e=ES[i];
                if(e.cap>0&&dis[e.to]>dis[v]+e.cost+h[v]-h[e.to]){
                    dis[e.to]=dis[v]+e.cost +h[v]-h[e.to];
                    prevv[e.to]=v;
                    preve[e.to]=i;
                    Q.push(P(dis[e.to],e.to));
                }
            }
        }
        if(dis[t]==INF) return -1;
        for(int v=0;v<V;v++) h[v]+=dis[v];
        int d=f;
        for(int v=t;v!=s;v=prevv[v])
            d=min(d,ES[preve[v]].cap);
        f-=d;
        res+=d*h[t];
        for(int v=t;v!=s;v=prevv[v]){
            EDGE &e=ES[preve[v]];
            e.cap-=d;
            ES[preve[v]^1].cap+=d;
        }
    }
    return res;
}
void clear_G(){
    eh=0;
    memset(head,-1,sizeof head);
}



int main()
{
//    ios::sync_with_stdio(false);
//    cin.tie(0);cout.tie(0);
    while(~scanf("%d%d%d",&m,&n,&k)){
      for(int i=0;i<n;++i)scanf("%d",wi+i);

      for(int i=0;i<k;++i){
          scanf("%d",ks+i);--ks[i];
      }

      k= unique(ks,ks+k) - ks;
      int s = k,t = k+1,S= t+1,T=S+1;

      clear_G();

      memset(lrsheet,-1,sizeof(lrsheet));
      int sums=0;
      for(int i=k-1;i>=0;--i){
            lra[i] = i;
            swap(lrsheet[ks[i]],lra[i]);
            sums += wi[ks[i]];
      }


      for(int i=0;i<k;++i){
        if(i+1<k) addedge(i,i+1,INF,0);
        if(lra[i]!=-1){
          addedge(i,lra[i]-1,1,-wi[ks[i]]);
        }
      }

      //add_edge(s,0,m-1,0);
      //add_edge(k-1,t,m-1,0);

      int res = min_cost_flow(0,k-1,m-1);

      printf("%d\n",sums+res);
    }
    return 0;
}



Measured memory_bytes: 4344