#include <bits/stdc++.h>

#define ll long long
#define el cout << '\n'
#define co_tat_ca_nhung_thieu_em using namespace std;
#define ngay_xua_em_che_toi_code_ga ios_base::sync_with_stdio(0);
#define bay_gio_toi_da_ga_hon cin.tie(0);
#define em_da_thay_hoi_han_chua cout.tie(0);
#define __QuocSensei__ int main()

co_tat_ca_nhung_thieu_em;

const int maxn = 1e5;

int n;
ll a[maxn + 10][2], dp[maxn + 10][2];

__QuocSensei__
{
    ngay_xua_em_che_toi_code_ga
    bay_gio_toi_da_ga_hon
    em_da_thay_hoi_han_chua

    if (fopen("GHEN.INP", "r"))
    {
        freopen("GHEN.INP", "r", stdin);
        freopen("GHEN.OUT", "w", stdout);
    }

    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i][0];
    for (int i = 1; i <= n; i++) cin >> a[i][1];

    dp[1][0] = a[1][0];
    dp[1][1] = a[1][1];

    for (int i = 2; i <= n; i++)
        for (int j = 0; j <= 1; j++)
            dp[i][j] = max(dp[i-1][!j], dp[i-2][!j] + a[i-1][j]) + a[i][j];
    cout << max(dp[n][0], dp[n][1]);
}