from collections import defaultdict N,M=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) C=list(map(int,input().split())) cum=[0] for i in C: cum.append(cum[-1]+i) before=defaultdict(lambda:-1) before[A[0]]=0 ans=[0]*(N+1) neg=0 for i in range(N-1): neg+=B[i%M] ans[i+1]=ans[before[A[i+1]-neg]]+cum[i+1]-cum[before[A[i+1]-neg]+1] before[A[i+1]-neg]=max(before[A[i+1]-neg],i+1) fin=ans[-2] for i in range(N): fin=min(fin,ans[i]+cum[-1]-cum[i+1]) print(fin)