#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, max1, max2;
  cin >> n;
  long long int H1[n + 1], H2[n + 1];
  for (int i = 1; i <= n; i++) cin >> H1[i];
  for (int i = 1; i <= n; i++) cin >> H2[i];
  if (n != 1) {
    H2[2] += H1[1];
    H1[2] += H2[1];
    max2 = max(H2[1], H2[2]);
    max1 = max(H1[1], H1[2]);
    for (int i = 3; i <= n; i++) {
      H1[i] = max2 + H1[i];
      H2[i] = max1 + H2[i];
      max1 = max(H1[i], max1);
      max2 = max(H2[i], max2);
    }
  }
  cout << max(H1[n], H2[n]) << endl;
}
