#include <bits/stdc++.h>
using namespace std;
char buf[(1 << 22)], *p1 = buf, *p2 = buf;
inline int read() {
  char c =
      (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 22, stdin), p1 == p2)
           ? EOF
           : *p1++);
  int x = 0, f = 1;
  while (c<'0' | c> '9') {
    if (c == '-') f = -1;
    c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 22, stdin), p1 == p2)
             ? EOF
             : *p1++);
  }
  while (c >= '0' && c <= '9')
    x = x * 10 + c - '0',
    c = (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 22, stdin), p1 == p2)
             ? EOF
             : *p1++);
  return x * f;
}
const int maxn = 1e5 + 10;
long long h[2][maxn], dp[2][maxn][2];
int main() {
  int n;
  while (~scanf("%d", &n)) {
    memset(dp, 0, sizeof dp);
    for (int i = 1; i <= n; i++) scanf("%d", &h[0][i]);
    for (int i = 1; i <= n; i++) scanf("%d", &h[1][i]);
    for (int i = 1; i <= n; i++) {
      for (int j = 0; j < 2; j++) {
        dp[j][i][0] = max(dp[j][i][0],
                          max(dp[j][i - 1][0],
                              max(dp[j][i - 1][1], max(dp[j ^ 1][i - 1][0],
                                                       dp[j ^ 1][i - 1][1]))));
        dp[j][i][1] =
            max(dp[j][i][1], max(dp[j ^ 1][i - 1][1],
                                 max(dp[j][i - 1][0], dp[j ^ 1][i - 1][0])) +
                                 h[j][i]);
      }
    }
    printf("%lld\n", max(dp[0][n][1], dp[1][n][1]));
  }
  return 0;
}
