#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie();
  long long i, n, t, k, j, m, x, s, c, r;
  t = 1;
  while (t--) {
    cin >> n;
    vector<long long> a(n), b(n);
    for (i = 0; i < n; i++) cin >> a[i];
    for (i = 0; i < n; i++) cin >> b[i];
    long long amax = 0, bmax = 0;
    for (i = 0; i < n; i++) {
      long long temp1 = max(amax, bmax + a[i]);
      long long temp2 = max(bmax, amax + b[i]);
      amax = temp1;
      bmax = temp2;
    }
    cout << max(amax, bmax);
  }
}
