#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long a = 0;
  char c = getchar();
  long long f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    a = a * 10 + c - '0';
    c = getchar();
  }
  return a *= f;
}
long long n, a[100005][2], ans;
long long opt[100005][2];
queue<long long> q;
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++) opt[i][0] = a[i][0] = read();
  for (long long i = 1; i <= n; i++) opt[i][1] = a[i][1] = read();
  for (long long i = 1; i <= n; i++)
    for (long long k = 0; k <= 1; k++)
      opt[i][k] = max(opt[i - 1][!k] + a[i][k], opt[i - 2][!k] + a[i][k]);
  for (long long i = 1; i <= n; i++)
    for (long long j = 0; j <= 1; j++) ans = max(ans, opt[i][j]);
  cout << ans << endl;
  return 0;
}
