#include <bits/stdc++.h>
using namespace std;
long long n, a[100005], b[100005], dp[100005][5];
long long fun(long long pos, long long ck) {
  if (pos > n) {
    return 0;
  }
  if (dp[pos][ck] != -1) {
    return dp[pos][ck];
  }
  long long res = 0, res1 = 0, res2 = 0;
  if (ck == 0) {
    res += max(a[pos] + fun(pos + 1, 1), b[pos] + fun(pos + 1, 2));
  } else if (ck == 1) {
    res += max(b[pos] + fun(pos + 1, 2), fun(pos + 1, 0));
  } else {
    res += max(a[pos] + fun(pos + 1, 1), fun(pos + 1, 0));
  }
  return dp[pos][ck] = res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  while (cin >> n) {
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 1; i <= n; i++) {
      cin >> b[i];
    }
    memset(dp, -1, sizeof(dp));
    long long ans = fun(1, 0);
    cout << ans << endl;
  }
  return 0;
}
