#include <bits/stdc++.h>
using namespace std;
long long int n, arr[2][100005];
long long int dp[2][100005];
long long int fun(int j, int type) {
  if (j == n) return 0;
  if (dp[type][j] != -1) return dp[type][j];
  long long int temp1 = fun(j + 1, abs(type - 1));
  dp[type][j] = max(arr[type][j] + temp1, max(fun(j + 1, type), temp1));
  return dp[type][j];
}
int main() {
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    std::cin >> arr[0][i];
  }
  for (int i = 0; i < n; i++) {
    std::cin >> arr[1][i];
  }
  memset(dp, -1, sizeof(dp));
  long long int ans1 = fun(0, 0), ans2 = fun(0, 1);
  std::cout << max(ans2, ans1) << std::endl;
  return 0;
}
