#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, input;
  cin >> n;
  vector<long long int> row1, row2;
  for (long long int i = 0; i < n; i++) {
    cin >> input;
    row1.push_back(input);
  }
  for (long long int i = 0; i < n; i++) {
    cin >> input;
    row2.push_back(input);
  }
  vector<long long int> upper(n), lower(n), nothing(n);
  upper[n - 1] = row1[n - 1];
  lower[n - 1] = row2[n - 1];
  nothing[n - 1] = 0;
  long long int a, b, c;
  for (long long int i = n - 2; i >= 0; i--) {
    a = row1[i] + lower[i + 1];
    b = row1[i] + nothing[i + 1];
    if (a > b)
      upper[i] = a;
    else
      upper[i] = b;
    a = row2[i] + upper[i + 1];
    b = row2[i] + nothing[i + 1];
    if (a > b)
      lower[i] = a;
    else
      lower[i] = b;
    a = upper[i + 1];
    b = lower[i + 1];
    c = nothing[i + 1];
    if (a > b) {
      if (a > c)
        nothing[i] = a;
      else
        nothing[i] = c;
    } else {
      if (b > c)
        nothing[i] = b;
      else
        nothing[i] = c;
    }
  }
  a = upper[0];
  b = lower[0];
  c = nothing[0];
  if (a > b) {
    if (a > c)
      cout << a;
    else
      cout << c;
  } else {
    if (b > c)
      cout << b;
    else
      cout << c;
  }
  return 0;
}
