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