#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long arr1[n];
  long long arr2[n];
  for (int i = 0; i < n; i++) cin >> arr1[i];
  for (int i = 0; i < n; i++) cin >> arr2[i];
  long long dp[2][n];
  dp[0][0] = arr1[0];
  dp[1][0] = arr2[0];
  long long maxi = max(arr1[0], arr2[0]);
  for (long long i = 1; i < n; i++) {
    dp[0][i] = max(dp[1][i - 1] + arr1[i], dp[0][i - 1]);
    dp[1][i] = max(dp[0][i - 1] + arr2[i], dp[1][i - 1]);
    maxi = max(maxi, max(dp[0][i], dp[1][i]));
  }
  cout << maxi;
  return 0;
}
