#include <bits/stdc++.h>
using namespace std;
vector<long long> arr[2];
long long n;
long long dp[100005][2];
long long solve(long long pos, long long cur) {
  if (pos == n) return 0;
  if (dp[pos][cur] != -1) return dp[pos][cur];
  long long ans;
  ans = max(solve(pos + 1, cur), solve(pos + 1, abs(cur - 1)) + arr[cur][pos]);
  dp[pos][cur] = ans;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  memset(dp, -1, sizeof(dp));
  cin >> n;
  arr[0].resize(n);
  arr[1].resize(n);
  for (long long i = 0; i < n; i++) cin >> arr[0][i];
  for (long long i = 0; i < n; i++) cin >> arr[1][i];
  cout << max(solve(0, 0), solve(0, 1)) << endl;
  return 0;
}
