#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long b, long long e, long long m) {
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b % m, e / 2, m) % m;
  return power(b * b % m, e / 2, m);
}
long long power(long long b, long long e) {
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b, e / 2);
  return power(b * b, e / 2);
}
int f[300001];
long long mi(long long n, long long p) {
  long long r = 1;
  while (p > 0) {
    if (p % 2) {
      r = (r * n) % 1000000007;
      p--;
    } else {
      n = (n * n) % 1000000007;
      p /= 2;
    }
  }
  return r;
}
long long nCr(long long n, long long r) {
  if (r == 0) return 1;
  return (f[n] * mi(f[r], 1000000007 - 2) % 1000000007 *
          mi(f[n - r], 1000000007 - 2) % 1000000007) %
         1000000007;
}
vector<int> v[500001];
int vist[500001] = {0};
int maxii = 0;
long long ans = 1000000;
int kk = 1;
int m, k, sum = 0;
int dfs(int st) {
  vist[st] = 1;
  if (kk == sum - k) return 0;
  for (int i = 0; i < v[st].size(); i++) {
    if (vist[v[st][i]] == 0) {
      if (kk == sum - k) return 0;
      vist[v[st][i]] = 1;
      kk++;
      dfs(v[st][i]);
    }
  }
  return 0;
}
const int N = 100005;
long long dp[N][2][2] = {0};
long long n;
long long a[100000], b[100000];
long long maxi(int i, int ch, int x) {
  if (i >= n) return 0;
  if (dp[i][x][ch] != -1) return dp[i][x][ch];
  if (x == 0)
    dp[i][x][ch] = max(maxi(i + 1, 0, 1) + b[i], maxi(i + 1, 1, 1) + a[i]);
  else if (ch == 1)
    dp[i][x][ch] = max(maxi(i + 1, 0, 1) + b[i], maxi(i + 1, 0, 0));
  else if (ch == 0)
    dp[i][x][ch] = max(maxi(i + 1, 1, 1) + a[i], maxi(i + 1, 1, 0));
  return dp[i][x][ch];
};
void hack() {
  cin >> n;
  memset(dp, -1, sizeof(dp));
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  cout << maxi(0, 0, 0) << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) hack();
  return 0;
}
