N = int(input()) A= list(map(int, input().split())) B = list(map(int, input().split())) ans=0 C = [] for i in range(N-1): if A[i]+max(B[i],B[i+1])