#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
long long memo[maxn][3], a[maxn], b[maxn];
int n;
long long solve(int i, int j) {
  if (i > n) return 0;
  if (memo[i][j] != 0) return memo[i][j];
  long long &cur = memo[i][j];
  if (j != 1) cur = max(cur, solve(i + 1, 1) + a[i]);
  if (j != 2) cur = max(cur, solve(i + 1, 2) + b[i]);
  cur = max(cur, solve(i + 1, 0));
  return cur;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  cout << solve(1, 0);
  return 0;
}
