#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  vector<long long> a(n), b(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) cin >> b[i];
  if (n == 1) {
    cout << max(a[0], b[0]);
    return 0;
  }
  a[1] += b[0], b[1] += a[0];
  for (long long i = 2; i < n; i++) {
    a[i] += max(b[i - 1], b[i - 2]);
    b[i] += max(a[i - 1], a[i - 2]);
  }
  cout << max(max(a[n - 1], b[n - 2]), max(b[n - 1], a[n - 2]));
}
