#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> h1(n), h2(n);
  for (long long i = 0; i < n; i++) {
    cin >> h1[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> h2[i];
  }
  long long dp[2][n];
  dp[0][0] = h1[0];
  dp[1][0] = h2[0];
  if (n == 1) {
    cout << max(h1[0], h2[0]) << "\n";
    return 0;
  }
  dp[0][1] = h2[0] + h1[1];
  dp[1][1] = h1[0] + h2[1];
  for (long long i = 2; i < n; i++) {
    dp[0][i] = max(dp[1][i - 1] + h1[i], dp[1][i - 2] + h1[i]);
    dp[1][i] = max(dp[0][i - 1] + h2[i], dp[0][i - 2] + h2[i]);
  }
  cout << max(dp[0][n - 1], dp[1][n - 1]) << "\n";
  return 0;
}
