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