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