#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 1;
long long n, a[maxn], b[maxn], f1, f2;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 0; i < n; ++i) cin >> a[i];
  for (long long i = 0; i < n; ++i) cin >> b[i];
  long long max1 = a[0], max2 = b[0];
  f1 = a[0];
  f2 = b[0];
  for (long long i = 1; i < n; ++i) {
    f1 = max2 + a[i];
    f2 = max1 + b[i];
    max1 = max(max1, f1);
    max2 = max(max2, f2);
  }
  cout << max(max1, max2) << '\n';
  return 0;
}
