#include <bits/stdc++.h>
using namespace std;
const int N = (int)(1 * 1e5 + 10);
int bit[N];
void update(int i, int add) {
  while (i > 0 && i < N) {
    bit[i] += add;
    i += (i & (-i));
  }
}
int sum1(int i) {
  int s = 0;
  while (i > 0) {
    s += bit[i];
    i = i - (i & (-i));
  }
  return s;
}
std::map<long long, long long> has;
set<long long> s1;
long long n;
std::vector<string> v1(2);
std::vector<int> edges[N];
int visited[N];
int dist[N];
int indegree[N];
void dfs(int a) {
  assert(!visited[a] == true);
  visited[a] = true;
  for (auto b : edges[a]) {
    dist[b] = max(dist[b], dist[a] + 1);
    --indegree[b];
    if (indegree[b] == 0) {
      dfs(b);
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long h, m, t, k, q, H, D, C, w, a, b;
  cin >> n;
  std::vector<long long> v1;
  std::vector<long long> v2;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v1.push_back(x);
  }
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v2.push_back(x);
  }
  std::vector<std::vector<long long> > dp(n + 1, std::vector<long long>(4, 0));
  for (long long i = 1; i <= n; i++) {
    dp[i][1] =
        max({dp[i - 1][2] + v1[i - 1], dp[i - 1][3] + v1[i - 1], v1[i - 1]});
    dp[i][2] =
        max({dp[i - 1][1] + v2[i - 1], dp[i - 1][3] + v2[i - 1], v2[i - 1]});
    dp[i][3] = max(dp[i - 1][1], dp[i - 1][2]);
  }
  cout << max(dp[n][1], dp[n][2]);
  return 0;
}
