#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1000 + 20;
long long n, h[2][MAXN], res[2][MAXN];
long long cal() {
  res[0][1] = max(h[0][0], h[1][0] + h[0][1]);
  res[1][1] = max(h[1][0], h[0][0] + h[1][1]);
  for (int i = 2; i < n; i++) {
    res[0][i] = max(res[0][i - 1], res[1][i - 1] + h[0][i]);
    res[1][i] = max(res[1][i - 1], res[0][i - 1] + h[1][i]);
  }
  return max(res[0][n - 1], res[1][n - 1]);
}
int main() {
  cin >> n;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < n; j++) cin >> h[i][j];
  if (n == 1)
    cout << max(h[0][0], h[1][0]) << endl;
  else
    cout << cal() << endl;
  return 0;
}
