n,m=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) c=list(map(int,input().split())) na=[0] for i in range(n-1): na+=[na[-1]+b[i%m]] z=[u-v for u,v in zip(a,na)] z=sorted(set(z)) d={v:i for i,v in enumerate(z)} q=[0]*(len(z)+1) for i in range(n): u,v=a[i],z[i] q[0]+=c[i] q[d[u-v]]-=c[i] q[d[u-v]+1]+=c[i] for i in range(1,len(z)+1): q[i]+=q[i-1] print(min(q))