#ifndef VS
#include<iostream>
#include<vector>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#include<string>
#include<assert.h>
#include<math.h>
#include<stdio.h>
#include<ctype.h>
#endif
using namespace std;
typedef long long LL;

#ifdef BTK
#define DEBUG if(1)
#else
#define DEBUG if(0)
#endif

#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define REC(ret, ...) std::function<ret (__VA_ARGS__)>
template <typename T>inline bool chmin(T &l, T r) { bool a = l>r; if (a)l = r; return a; }
template <typename T>inline bool chmax(T &l, T r) { bool a = l<r; if (a)l = r; return a; }

struct input {
	bool success;
	input(){success = true;}
#ifdef BTK
	template<typename T>inline input& operator>>(T& x) {success = !!(cin >> x);return *this;}
#else
	inline input& operator>>(LL& x) {success = (scanf("%lld", &x) != EOF);return *this;}
	inline input& operator>>(int& x) {success = (scanf("%d", &x) != EOF);return *this;}
	inline input& operator>>(char* x) {success = (scanf("%s", x) != EOF);return *this;}
	inline input& operator>>(double& x) {success = (scanf("%llf", &x) != EOF);return *this;}
#endif
}in;

const char space = ' ';
const char ln = '\n';
struct output {
#ifdef BTK
	template<typename T>inline output& operator<<(T x) {cout << x; return (*this);}
	inline void fp(const double x, const char* s) { char buf[20];sprintf(buf, s, x); cout << buf;}
#else
	inline output& operator<<(const string& x) { printf("%s", x.c_str()); return *this; }
	inline output& operator<<(const int x) { printf("%d", x); return *this;}
	inline output& operator<<(const char x) { putchar(x); return *this;}
	inline output& operator<<(const LL x) { printf("%lld", x); return *this;}
	inline output& operator<<(const double x) { printf("%lf", x); return *this;}
	inline void fp(const double x, const char* s) {printf(s, x);}
#endif
}out;
typedef int FLOW;
typedef LL COST;
namespace MinCostFlow {
	const FLOW FLOW_INF = 1e7;
	const COST COST_INF = 1e15;
	struct edge {
		FLOW flow; COST cost;
		int to, rev;
	};
	typedef vector<edge> E;
	typedef vector<E> Graph;
	void addedge(Graph&g, int from, int to, FLOW f, COST c) {
		int x = g[from].size();
		int y = g[to].size();
		edge a = { f,c,to,y };
		edge b = { (FLOW)0,-c,from,x };
		g[from].push_back(a);
		g[to].push_back(b);
	}

	const int BUF = 11234;
	COST h[BUF];
	COST d[BUF];
	int pV[BUF];
	int pE[BUF];
	void init(int size = BUF) {
		REP(i, size)h[i] = 0;
	}
	typedef pair<COST, int> P;
	priority_queue<P> que;
}



pair<FLOW, COST> maxflow(MinCostFlow::Graph &g, int s, int t, bool init = true) {
	const int V = g.size();
	if (init)MinCostFlow::init();
	using namespace MinCostFlow;
	COST c = 0;
	FLOW f = 0;
	while (true) {
		fill(d, d + V, COST_INF);
		d[s] = 0;
		que.push(P(0, s));
		while (que.size()) {
			P p = que.top(); que.pop();
			COST cost = -p.first;
			int v = p.second;
			if (d[v]<cost)continue;
			REP(i, g[v].size()) {
				edge &e = g[v][i];
				if (e.flow>0 && d[e.to]>d[v] + e.cost + h[v] - h[e.to]) {
					d[e.to] = d[v] + e.cost + h[v] - h[e.to];
					pV[e.to] = v;
					pE[e.to] = i;
					que.push(P(-d[e.to], e.to));
				}
			}
		}
		if (d[t] == COST_INF)break;

		REP(v, V)h[v] += d[v];
		FLOW ff = FLOW_INF;
		for (int v = t; v != s; v = pV[v]) {
			edge& e = g[pV[v]][pE[v]];
			chmin(ff, e.flow);
		}
		f += ff;
		c += ff*h[t];
		for (int v = t; v != s; v = pV[v]) {
			edge &e = g[pV[v]][pE[v]];
			e.flow -= ff;
			g[v][e.rev].flow += ff;
		}
	}
	return pair<FLOW, COST>(f, c);
}

LL w[112345];
int pos[112345];
int main() {
	int M, N, K;
	in >> M >> N >> K;
	M--;
	REP(i, N)in >> w[i];
	REP(i, N)pos[i] = -1;
	int V = K + 1;
	int S = V++;
	int T = V++;
	MinCostFlow::Graph g(V);
	MinCostFlow::addedge(g, S, 0, M, 0);
	MinCostFlow::addedge(g, K, T, M, 0);
	REP(i, K)MinCostFlow::addedge(g, i, i + 1, M, 10000);
	LL tot = 0;
	REP(i, K) {
		int a;
		in >> a;
		a--;
		tot += w[a];
		if (pos[a] != -1&&pos[a]!=i) {
			MinCostFlow::addedge(g, pos[a], i, 1, (10000)*(i-pos[a])-w[a]);
		}
		if (pos[a] == i)tot -= w[a];
		pos[a] = i + 1;
	}
	pair<FLOW, COST> fc = maxflow(g, S, T);
	out << tot + fc.second - M*10000*K<<ln;
	return 0;
}



Measured memory_bytes: 4728