#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int tt = 1;
  while (tt--) {
    int n;
    cin >> n;
    vector<vector<long long>> h(2, vector<long long>(n + 3, 0));
    vector<vector<long long>> dp(2, vector<long long>(n + 3, 0));
    for (int i = (int)(1); i < (int)(n + 1); i++) cin >> h[0][i];
    for (int i = (int)(1); i < (int)(n + 1); i++) cin >> h[1][i];
    for (int i = (int)(0); i < (int)(n + 1); i++) {
      for (int j = (int)(0); j < (int)(2); j++) {
        dp[!j][i + 1] = max(dp[!j][i + 1], dp[j][i] + h[!j][i + 1]);
        dp[!j][i + 2] = max(dp[!j][i + 2], dp[j][i] + h[!j][i + 2]);
      }
    }
    long long ans = max(dp[0][n], dp[1][n]);
    cout << ans;
  }
}
