#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define per(i, a, b) for (int i = a; i >= b; i--)
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
typedef long long LL;
typedef pair <int, int> P;
const int N = 2e5 + 5;

int n, a[N], b[N], c[N];
LL ans, res;

int main() {
	cin>>n;
	rep (i, 1, n) scanf("%d", &a[i]), ans += a[i];
	rep (i, 1, n) scanf("%d", &b[i]), b[i] -= a[i];
	rep (i, 1, n) {
		if (i&1) b[(i + 1)>>1] = b[i];
		else c[i>>1] = b[i]; 
	} 
	sort(b + 1, b + n/2 + 1);
	sort(c + 1, c + n/2 + 1);
	res = ans;
	per (i, n/2, 1) res += b[i] + c[i], ans = max(ans, res);
	printf("%lld\n", ans);
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ld long double
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define bs binary_search
#define F first
#define S second
#define pll pair<ll, ll>
#define all(v) (v).begin(), (v).end()
#define decimal(n) cout << fixed << setprecision(n)
#define mod 1000000007
// #define mod 998244353
#define pi 3.14159265358979323846

ll ncr(ll n, ll r)
{
    ll p = 1, k = 1;

    if (n - r < r)
        r = n - r;

    if (r != 0)
    {
        while (r)
        {
            p *= n;
            k *= r;
            ll m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }
    else
        p = 1;
    return p;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll t = 1, tc;
    //cin >> t;
    for (tc = 1; tc <= t; tc++)
    {
        ll l;
        cin >> l;
        cout << ncr(l - 1, 11);
    }
    return 0;
}