#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 1e9 + 7;
const int base = 131;
const double eps = 0.0000001;
const double pi = acos(-1);
const int MAXN = 1e5 + 5;
int n;
long long dp[MAXN][3];
int a[MAXN], b[MAXN];
int main() {
  while (~scanf("%d", &n)) {
    memset(dp, 0, sizeof(dp));
    ;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
    long long ans = 0;
    for (int i = 1; i <= n; i++) {
      dp[i][0] = max(dp[i - 1][1], dp[i - 1][2]);
      dp[i][1] = max(dp[i - 1][0], dp[i - 1][2]) + a[i];
      dp[i][2] = max(dp[i - 1][0], dp[i - 1][1]) + b[i];
      ans = max(max(dp[i][0], dp[i][1]), dp[i][2]);
    }
    printf("%lld\n", ans);
  }
  return 0;
}
