#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
long long int a[5][100005], dp[5][100005];
int main() {
  ios_base::sync_with_stdio(false);
  long long int n;
  cin >> n;
  for (int i = 1; i <= 2; i++) {
    for (int j = 1; j <= n; j++) {
      cin >> a[i][j];
    }
  }
  dp[1][1] = a[1][1];
  dp[2][1] = a[2][1];
  dp[1][2] = (a[2][1] + a[1][2]);
  dp[2][2] = (a[2][2] + a[1][1]);
  for (int j = 3; j <= n; j++) {
    for (int i = 1; i <= 2; i++) {
      int k;
      if (i == 1)
        k = 2;
      else
        k = 1;
      dp[i][j] = max(dp[k][j - 1] + a[i][j], dp[k][j - 2] + a[i][j]);
    }
  }
  cout << max(dp[1][n], dp[2][n]);
  return 0;
}
