#include <bits/stdc++.h>
using namespace std;
vector<long long int> h1, h2;
long long int dp[100000 + 100][3];
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  long long int n;
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    h1.push_back(x);
  }
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    h2.push_back(x);
  }
  dp[0][0] = 0;
  dp[0][1] = h1[0];
  dp[0][2] = h2[0];
  for (long long int i = 1; i < n; i++) {
    dp[i][0] = max(dp[i - 1][0], max(dp[i - 1][1], dp[i - 1][2]));
    dp[i][1] = h1[i] + max(dp[i - 1][0], dp[i - 1][2]);
    dp[i][2] = h2[i] + max(dp[i - 1][0], dp[i - 1][1]);
  }
  cout << max(dp[n - 1][0], max(dp[n - 1][1], dp[n - 1][2]));
}
