from collections import Counter N,M,K=map(int,input().split()) B=list(map(int,input().split())) A=list(map(int,input().split())) MAX=[0]*(M+1) C=Counter() for i in range(M): C[B[i]]+=1 for c in C: MAX[c]=C[c] for i in range(M,N): C[B[i]]+=1 C[B[i-M]]-=1 MAX[B[i]]=C[B[i]] ANS=1<<60 for i in range(1,M+1): ANS=min(ANS,(M-MAX[i])*A[i-1]) print(ANS)