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

int main(void)
{
	int f1, n, p, cnt;
	unsigned int k, sum, max;
	vector<int> J;

	while(cin >> n && n > 0)
	{	
		sum = 0;
		cnt = 1;
		for(f1 = 0; f1 < n; f1++)
		{
			cin >> p;
			sum += p;
		}
		for(f1 = 0; f1 < n-1; f1++)
		{
			cin >> p;
			sum += p;
			J.push_back(p);
		}

		max = sum;
		sort(J.begin(), J.end()); //平均O(nlogn)
		vector<int>::iterator t = J.begin();

		while(t != J.end())
		{
			sum -= *t;
			k = ++cnt * sum;
			
			if(k > max)
				max = k;
			t++;
		}
		J.clear();
		cout << max << endl;
	}

	return 0;
}