#include <bits/stdc++.h>
using namespace std;
long long int hey(long long int i, long long int arr, long long int a[],
                  long long int b[], long long int n, long long int dp[][2]) {
  if (i == n) return 0;
  if (dp[i][arr] != -1) return dp[i][arr];
  long long int ans = -1e9 + 5;
  if (arr == 0) {
    ans = max(ans, b[i] + hey(i + 1, 1, a, b, n, dp));
    ans = max(ans, max(hey(i + 1, 1, a, b, n, dp), hey(i + 1, 0, a, b, n, dp)));
  } else if (arr == 1) {
    ans = max(ans, a[i] + hey(i + 1, 0, a, b, n, dp));
    ans = max(ans, max(hey(i + 1, 0, a, b, n, dp), hey(i + 1, 1, a, b, n, dp)));
  }
  return dp[i][arr] = ans;
}
int main() {
  long long int r = 0, i, n, d = 0, l = 0, m = 1, j, e, h, v, k, t, a, q, u, b;
  cin >> n;
  long long int t1[n], t2[n];
  for (i = 0; i < n; i++) cin >> t1[i];
  for (i = 0; i < n; i++) cin >> t2[i];
  long long int dp[n][2];
  memset(dp, -1, sizeof dp);
  long long int x = hey(0, 0, t1, t2, n, dp);
  long long int y = hey(0, 1, t1, t2, n, dp);
  cout << max(x, y);
  return 0;
}
