#include <bits/stdc++.h>
using namespace std;
vector<long long> r1, r2;
long long dp[(long long)1e5 + 1][3];
int n;
long long MaxHeight(int idx, int prev) {
  if (idx == n)
    return 0;
  else {
    if (dp[idx][prev] != -1) return dp[idx][prev];
    dp[idx][prev] = MaxHeight(idx + 1, 0);
    if (prev == 1) {
      return dp[idx][prev] =
                 max(dp[idx][prev], MaxHeight(idx + 1, 2) + r2[idx]);
    } else if (prev == 2) {
      return dp[idx][prev] =
                 max(dp[idx][prev], MaxHeight(idx + 1, 1) + r1[idx]);
    } else
      return dp[idx][prev] =
                 max(max(dp[idx][prev], MaxHeight(idx + 1, 2) + r2[idx]),
                     MaxHeight(idx + 1, 1) + r1[idx]);
  }
}
int main() {
  cin >> n;
  r1.resize(n);
  r2.resize(n);
  for (int i = 0; i < n; i++) cin >> r1[i];
  for (int i = 0; i < n; i++) cin >> r2[i];
  memset(dp, -1, sizeof dp);
  cout << MaxHeight(0, 0);
  return 0;
}
