#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> mp;
#define inf 1e9


int main(){
    while(1){
	int n;
	cin>>n;
	if(n==0)break;
	ll sum =0;
	for(int i=0;i<n;i++){
		ll p;
		cin>>p;
		sum+= p;

	}
	priority_queue<ll,vector<ll> , greater<ll> > q;
	ll bit = 1;
	for(int i=0;i<n-1;i++){
		ll j = 0;
		cin>>j;
		sum+=j;
		q.push(j);
	}
	ll res = 0;
	res = max(res,sum*bit);
	for(int i=0;i<n-1;i++){
	    ll dis = q.top();
	    sum-=dis;
	    q.pop();
	    bit++;
	    res = max(res,sum*bit);
	}
	cout<<res<<endl;
    }
	return 0;
}

