#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int h1[n], h2[n];
  for (int i = 0; i < n; i++) cin >> h1[i];
  for (int i = 0; i < n; i++) cin >> h2[i];
  long long int dp1[n], dp2[n], dp3[n];
  dp1[0] = h1[0];
  dp2[0] = h2[0];
  dp3[0] = 0;
  for (int i = 1; i < n; i++) {
    dp1[i] = max(dp2[i - 1] + h1[i], dp3[i - 1] + h1[i]);
    dp2[i] = max(dp1[i - 1] + h2[i], dp3[i - 1] + h2[i]);
    dp3[i] = max(dp1[i - 1], dp2[i - 1]);
  }
  cout << max(dp1[n - 1], max(dp2[n - 1], dp3[n - 1])) << endl;
  return 0;
}
