#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
const int N = 2e5 + 123;
int a[N], b[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  long long s1 = 0, s2 = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; ++i) {
    cin >> b[i];
  }
  for (int i = 0; i < n; ++i) {
    long long x = s1, y = s2;
    s1 = max(s1, y + a[i]);
    s2 = max(s2, x + b[i]);
  }
  cout << max(s1, s2);
}
