#include <bits/stdc++.h>
using namespace std;
long long int** dp;
long long int getMaxHeight(long long int* h1, long long int* h2, int n, int i,
                           int row) {
  if (i == n) {
    return 0;
  }
  if (dp[i][row] != -1) {
    return dp[i][row];
  }
  long long int x1 = getMaxHeight(h1, h2, n, i + 1, row);
  long long int x2 =
      getMaxHeight(h1, h2, n, i + 1, 1 - row) + (row == 0 ? h1[i] : h2[i]);
  long long int ans = max(x1, x2);
  dp[i][row] = ans;
  return ans;
}
int main() {
  int n;
  cin >> n;
  dp = new long long int*[n];
  for (int i = 0; i < n; i++) {
    dp[i] = new long long int[2];
    dp[i][0] = dp[i][1] = -1;
  }
  long long int h1[n], h2[n];
  for (int i = 0; i < n; i++) {
    cin >> h1[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> h2[i];
  }
  long long int ans = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 2; j++) {
      ans =
          max(getMaxHeight(h1, h2, n, i + 1, 1 - j) + (j == 0 ? h1[i] : h2[i]),
              ans);
    }
  }
  cout << ans;
  return 0;
}
