#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long dp[maxn][3];
long long a[3][maxn];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[1][i];
  for (int i = 1; i <= n; ++i) cin >> a[2][i];
  for (int i = 1; i <= n; ++i) {
    dp[i][0] = max(dp[i - 1][1], dp[i - 1][2]);
    dp[i][1] = max(dp[i - 1][2], dp[i - 1][0]) + a[1][i];
    dp[i][2] = max(dp[i - 1][1], dp[i - 1][0]) + a[2][i];
  }
  cout << *max_element(dp[n], dp[n] + 3);
  return 0;
}
