#include <bits/stdc++.h>
using namespace std;
vector<long long> h1;
vector<long long> h2;
long long n;
long long dp[100005][2];
bool vis[100005][2];
long long go(long long idx, long long prev) {
  if (!vis[idx][prev]) {
    vis[idx][prev] = true;
    if (idx == n) return dp[idx][prev] = 0;
    if (prev == 0)
      return dp[idx][prev] = max(go(idx + 1, 0), go(idx + 1, 1) + h1[idx]);
    else
      return dp[idx][prev] = max(go(idx + 1, 1), go(idx + 1, 0) + h2[idx]);
  }
  return dp[idx][prev];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  h1.resize(n, 0);
  h2.resize(n, 0);
  for (long long i = 0; i <= n; ++i)
    dp[i][0] = dp[i][1] = vis[i][0] = vis[i][1] = 0;
  for (long long i = 0; i < n; ++i) cin >> h1[i];
  for (long long i = 0; i < n; ++i) cin >> h2[i];
  cout << max(go(0, 0), go(0, 1)) << "\n";
}
