#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n), b(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  ll ans1 = a[0], ans2 = b[0];
  for (int i = 1; i < n; i++) {
    ll d1 = ans1, d2 = ans2;
    ans1 = max(ans1, d2 + a[i]);
    ans2 = max(ans2, d1 + b[i]);
  }
  cout << max(ans1, ans2) << '\n';
  return 0;
}
