N,M = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) C = list(map(int,input().split())) A1 = [0]*N for i in range(1,N): A1[i] = A1[i-1]+B[(i-1)%M] D = [0]*N for i in range(N): D[i] = A[i]-A1[i] E = {} for i in range(N): if D[i] not in E: E[D[i]] = [] E[D[i]].append(i) F = {d:0 for d in E} for d in F: F[d] = sum(C[i] for i in E[d]) ans = sum(C)-max(F.values()) print(ans)