#include <bits/stdc++.h>
using namespace std;
long long int n, v1[100009], v2[100009];
long long int din[100009][2];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> v1[i];
  }
  for (int i = 1; i <= n; ++i) {
    cin >> v2[i];
  }
  din[1][0] = v1[1];
  din[1][1] = v2[1];
  for (int i = 2; i <= n; ++i) {
    din[i][0] = v1[i] + max(din[i - 1][1], max(din[i - 2][0], din[i - 2][1]));
    din[i][1] = v2[i] + max(din[i - 1][0], max(din[i - 2][0], din[i - 2][1]));
  }
  cout << max(din[n][0], din[n][1]);
  return 0;
}
