#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n;
long long h[N][2], dp[N][2];
long long solve(int i, int Row) {
  if (i == n) return 0;
  long long& r = dp[i][Row];
  if (r != -1) return r;
  return r = max(solve(i + 1, !Row) + h[i][Row], solve(i + 1, Row));
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> h[i][0];
  for (int i = 0; i < n; i++) cin >> h[i][1];
  memset(dp, -1, sizeof dp);
  cout << max(solve(0, 1), solve(0, 0)) << endl;
}
