#include <bits/stdc++.h>
using namespace std;
int n, a[100002], b[100002];
long long dp[100002][4];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[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][0], dp[i - 1][2]) + a[i];
    dp[i][2] = max(dp[i - 1][0], dp[i - 1][1]) + b[i];
  }
  printf("%lld\n", max(dp[n][1], dp[n][2]));
  return 0;
}
