#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long int> v(n);
  vector<long long int> v1(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> v1[i];
  }
  pair<unsigned long long int, unsigned long long int> p;
  for (int i = 0; i < n; i++) {
    pair<unsigned long long int, unsigned long long int> temp = {
        max(p.first, p.second + v[i]), max(p.second, p.first + v1[i])};
    p = temp;
  }
  cout << max(p.first, p.second) << endl;
  return 0;
}
