#include <bits/stdc++.h>
using namespace std;
int n;
long long a[100001];
long long b[100001];
long long f[100001][2];
template <typename T>
inline T read() {
  T x = 0;
  T multiplier = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') {
      multiplier = -1;
    }
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch & 15);
    ch = getchar();
  }
  return x * multiplier;
}
int main() {
  n = read<int>();
  for (int i = 1; i <= n; i++) {
    a[i] = read<long long>();
  }
  for (int i = 1; i <= n; i++) {
    b[i] = read<long long>();
  }
  for (int i = 1; i <= n; i++) {
    f[i][0] = max(f[i - 1][0], f[i - 1][1] + a[i]);
    f[i][1] = max(f[i - 1][1], f[i - 1][0] + b[i]);
  }
  cout << max(f[n][0], f[n][1]) << '\n';
  return 0;
}
