#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n), b(n);
  long long up = 0, down = 0, temp;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) cin >> b[i];
  for (long long i = 0; i < n; i++) {
    temp = up;
    up = max(up, a[i] + down);
    down = max(down, b[i] + temp);
  }
  cout << max(up, down) << endl;
  return 0;
}
