#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t n;
  cin >> n;
  vector<int64_t> h1(n);
  vector<int64_t> h2(n);
  for (int i = 0; i < n; ++i) {
    cin >> h1[i];
  }
  for (int i = 0; i < n; ++i) {
    cin >> h2[i];
  }
  vector<int64_t> best1(n);
  vector<int64_t> best2(n);
  best1[0] = h1[0];
  best2[0] = h2[0];
  for (int i = 1; i < n; ++i) {
    if (i == 1) {
      best1[i] = std::max(h1[i] + best2[i - 1], best1[i - 1]);
      best2[i] = std::max(h2[i] + best1[i - 1], best2[i - 1]);
    } else {
      best1[i] = std::max(std::max(h1[i] + best2[i - 1], h1[i] + best2[i - 2]),
                          best1[i - 1]);
      best2[i] = std::max(std::max(h2[i] + best1[i - 1], h2[i] + best1[i - 2]),
                          best2[i - 1]);
    }
  }
  const auto ans = std::max(best1.back(), best2.back());
  cout << ans << endl;
  return 0;
}
