#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long mod6 = 1e6;
const long long N = 1e6 + 5;
const long long INF = 1e9 + 10;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<vector<long long>> a(2, vector<long long>(n));
  vector<vector<long long>> dp(2, vector<long long>(n));
  for (long long j = 0; j < 2; j++)
    for (long long i = 0; i < n; i++) cin >> a[j][i];
  dp[0][n - 1] = a[0][n - 1];
  dp[1][n - 1] = a[1][n - 1];
  for (long long i = n - 2; i >= 0; i--)
    for (long long j = 0; j < 2; j++) {
      dp[j][i] = max(dp[j][i + 1], dp[j ^ 1][i + 1] + a[j][i]);
    }
  cout << max(dp[0][0], dp[1][0]);
  return 0;
}
