#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long a[n], b[n];
  for (long long i = 0; i < n; ++i) cin >> a[i];
  for (long long i = 0; i < n; ++i) cin >> b[i];
  long long dp[n][2][2];
  for (long long i = 0; i < n; ++i) {
    dp[i][0][0] = 0;
    dp[i][0][1] = 0;
    dp[i][1][0] = 0;
    dp[i][1][1] = 0;
  }
  dp[0][0][1] = a[0];
  dp[0][1][1] = b[0];
  for (long long i = 1; i < n; ++i) {
    dp[i][0][1] =
        max(dp[i - 1][0][1], max(dp[i - 1][0][0], dp[i - 1][1][1]) + a[i]);
    dp[i][1][1] =
        max(dp[i - 1][1][1], max(dp[i - 1][0][0], dp[i - 1][0][1]) + b[i]);
  }
  cout << max(dp[n - 1][0][1], dp[n - 1][1][1]);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
