#include <bits/stdc++.h>
using namespace std;
long long int height[2][100000], ans[2][100000];
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) cin >> height[0][i];
  for (int i = 0; i < N; i++) cin >> height[1][i];
  ans[0][0] = height[0][0];
  ans[0][1] = height[1][0] + height[0][1];
  ans[1][0] = height[1][0];
  ans[1][1] = height[0][0] + height[1][1];
  for (int j = 2; j < N; j++) {
    for (int i = 0; i < 2; i++) {
      ans[i][j] = max((ans[(i + 1) % 2][j - 2] + height[i][j]),
                      (ans[(i + 1) % 2][j - 1] + height[i][j]));
    }
  }
  cout << max(ans[0][N - 1], ans[1][N - 1]);
}
