N, M, K = map(int, input().split())
C = list(map(lambda x: int(x)-1, input().split()))
A = list(map(int, input().split()))

eggs = [0]*M

for c in C[:K]:
    eggs[c] += 1

answer = float("inf")
for color, count in enumerate(eggs):
    answer = min(A[color]*(K-count), answer)

for del_c, c in zip(C, C[K:]):
    eggs[del_c] -= 1
    eggs[c] += 1
    answer = min(A[c]*(K-eggs[c]), answer)

print(answer)