#include <bits/stdc++.h>
using namespace std;
const int N = int(1e5) + 1;
int h[2][N];
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  int n;
  cin >> n;
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < n; j++) cin >> h[i][j];
  }
  long long dp00, dp01, dp10 = h[0][n - 1], dp11 = h[1][n - 1];
  for (int i = n - 2; i >= 0; i--) {
    dp00 = max(h[0][i] + dp11, dp10);
    dp01 = max(h[1][i] + dp10, dp11);
    dp10 = dp00;
    dp11 = dp01;
  }
  cout << max(dp10, dp11) << '\n';
  return 0;
}
