#include <bits/stdc++.h>
using namespace std;
long long int a[100000][2];
long long int b[100001];
long long int c[100001];
int n1 = 0;
long long int dfs(long long int i, long long int k) {
  if (i == n1)
    return 0;
  else {
    if (a[k][i] != 0) {
      return a[k][i];
    } else {
      if (k == 0) {
        a[k][i] = max(b[i] + dfs(i + 1, 1), dfs(i + 1, 0));
        return a[k][i];
      } else {
        a[k][i] = max(c[i] + dfs(i + 1, 0), dfs(i + 1, 1));
        return a[k][i];
      }
    }
    return a[k][i];
  }
}
int main() {
  long long int n;
  cin >> n;
  n1 = n;
  memset(a, 0, sizeof(a));
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> c[i];
  }
  cout << max(dfs(0, 0), dfs(0, 1));
}
