#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long row1[n], row2[n];
  for (int i = 0; i < n; i++) cin >> row1[i];
  for (int i = 0; i < n; i++) cin >> row2[i];
  long long first, second, pref = 0, pres = 0;
  for (int i = 0; i < n; i++) {
    first = max(pref, pres + row1[i]);
    second = max(pres, pref + row2[i]);
    pref = first;
    pres = second;
  }
  cout << max(pref, pres);
  return 0;
}
