#include <bits/stdc++.h>
using namespace std;
long long dp[100005][2], n, h[2][100005], ans;
int main() {
  cin >> n;
  for (int j = 0; j < 2; j++)
    for (int i = 1; i <= n; i++) cin >> h[j][i];
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < 2; j++) {
      dp[i][j] = dp[i - 1][j];
      dp[i][j] = max(dp[i][j], dp[i - 1][1 - j] + h[j][i]);
      ans = max(ans, dp[i][j]);
    }
  cout << ans;
}
