#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
int n;
struct node {
  int a, b;
  node(int a, int b) : a(a), b(b) {}
};
int a[3][maxn];
int main() {
  cin >> n;
  for (int i = 1; i <= 2; i++) {
    for (int j = 1; j <= n; j++) cin >> a[i][j];
  }
  pair<long long, long long> ans{0, 0};
  for (int i = 1; i <= n; i++) {
    pair<long long, long long> dp{max(ans.first, ans.second + a[1][i]),
                                  max(ans.second, ans.first + a[2][i])};
    ans = dp;
  }
  cout << max(ans.first, ans.second) << endl;
}
