#include <bits/stdc++.h>
using namespace std;
int a[100100], b[100100];
long long dp[2][100100];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= n; i++) {
    dp[0][i] = max(a[i] + dp[1][i - 1], dp[0][i - 1]);
    dp[1][i] = max(b[i] + dp[0][i - 1], dp[1][i - 1]);
  }
  printf("%lld\n", max(dp[0][n], dp[1][n]));
}
