#include <iostream>
#include <algorithm>
using namespace std;
typedef unsigned int u;
u n,p,j[65000];
u solve(){
    u ans=p*n;
    for(u i=0;n>1;i++){
        ans=max(ans,(p+=j[i])*--n);
    }
    return ans;
}
int main(void){
    while(1){
        
        cin>>n;
        if(n==0)break;
        p=0;
        for(u i=0;i<n;i++){
            u pn;
            cin>>pn;
            p+=pn;
        }
        for(u i=0;i<n-1;i++){
            cin>>*(j+i);
        }
        sort(j,j+n-1,greater<u>());
        cout<<solve()<<endl;
    }
}