#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n], b[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
  }
  if (n == 1)
    cout << max(a[0], b[0]);
  else {
    long long x = a[n - 1];
    long long y = b[n - 1];
    for (long long i = n - 2; i >= 0; i--) {
      long long t = x;
      a[i] += y;
      x = max(x, a[i]);
      b[i] += t;
      y = max(y, b[i]);
    }
    cout << max(x, y) << endl;
  }
  return 0;
}
