#include <bits/stdc++.h>
using namespace std;
long long dp[100005][2];
int main() {
  int n;
  cin >> n;
  int arr[n], brr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> brr[i];
  }
  for (int i = 0; i < n; i++) {
    dp[i + 1][0] = max(dp[i][1] + arr[i], dp[i][0]);
    dp[i + 1][1] = max(dp[i][0] + brr[i], dp[i][1]);
  }
  cout << max(dp[n][0], dp[n][1]);
}
