#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n; cin >> n;
    vector<vector<int>> a(3, vector<int>(n + 1));
    for (int i: {1, 2}) for (int j = 1; j <= n; j++) {
        cin >> a[i][j];
        a[i][j] += max(a[i - 1][j], a[i][j - 1]);
    }
    cout << a[2][n] << endl;
    return 0;
}
