#include <bits/stdc++.h>
using namespace std;
long long maxHeight(long long a[], long long b[], long long n) {
  long long dp[n][3];
  for (long long i = 0; i < n; i++) {
    dp[i][0] = dp[i][1] = dp[i][2] = INT_MIN;
  }
  dp[0][0] = 0;
  dp[0][1] = a[0];
  dp[0][2] = b[0];
  for (long long 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] = max(dp[i - 1][0], dp[i - 1][2]) + a[i];
    dp[i][2] = max(dp[i - 1][0], dp[i - 1][1]) + b[i];
  }
  return max(dp[n - 1][0], max(dp[n - 1][1], dp[n - 1][2]));
}
signed main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long b[n];
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
  }
  cout << maxHeight(a, b, n);
}
