#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
const long long inf = INF;
long long modulo = pow(10, 9) + 7;
long long dp[600100][2];
long long arr[600100][2];
void deal() {
  long long n;
  cin >> n;
  for (long long j = 0; j < 2; j++)
    for (long long i = 0; i < n; i++) cin >> arr[i + 1][j];
  for (long long i = 1; i <= n; i++)
    for (long long j = 0; j < 2; j++)
      dp[i][j] = max(dp[i - 1][j], dp[i - 1][!j] + arr[i][j]);
  cout << max(dp[n][0], dp[n][1]);
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  deal();
}
