#include <bits/stdc++.h>
using namespace std;
long long dp[100005][3];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a[n + 1], b[n + 1];
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= n; i++) cin >> b[i];
  dp[1][1] = a[1], dp[1][2] = b[1];
  for (long long i = 2; i <= n; i++) {
    dp[i][0] = max({dp[i - 1][0], dp[i - 1][1], dp[i - 1][2]});
    dp[i][1] = max({dp[i - 1][0] + a[i], dp[i - 1][2] + a[i]});
    dp[i][2] = max({dp[i - 1][0] + b[i], dp[i - 1][1] + b[i]});
  }
  cout << max({dp[n][0], dp[n][1], dp[n][2]});
}
