from enum import IntEnum, auto # ステート遷移 class E(IntEnum): S = 0 # 開始 Nothing1 = auto() Nothing2 = auto() Nothing3 = auto() Single1 = auto() Single2 = auto() Both = auto() def nexts(self): match self: case E.S: return [E.Nothing1, E.Single1, E.Both] case E.Nothing1: return [E.Nothing1, E.Single1, E.Both] case E.Nothing2: return [E.Nothing2, E.Single2] case E.Nothing3: return [E.Nothing3] case E.Single1: return [E.Single1, E.Both, E.Nothing2] case E.Single2: return [E.Single2, E.Nothing3] case E.Both: return [E.Both, E.Single2, E.Nothing3] assert False def cost(self, a, b, c): match self: case E.S: return 0 case E.Nothing1 | E.Nothing2 | E.Nothing3: return a case E.Single1 | E.Single2: return b case E.Both: return c assert False @staticmethod def states(): for fm in E: for to in fm.nexts(): yield fm, to N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) C = list(map(int, input().split())) dp = [[0] * len(E) for _ in range(N+1)] for i, (a, b, c) in enumerate(zip(A, B, C)): for fm, to in E.states(): dp[i+1][to] = max(dp[i+1][to], dp[i][fm] + to.cost(a, b, c)) ans = max(dp[N][s] for s in E) print(ans)