#include<bits/stdc++.h>

using namespace std;

int N;
unsigned int PipeTotalLen;
unsigned int JointLength[65000];


bool cmp(const unsigned int j1, const unsigned int j2) {
	return j1 > j2;
}

void solve() {
	unsigned int maxMoney;

	sort(JointLength + 1, JointLength + N, cmp);
	maxMoney = PipeTotalLen*N;
	for (int i = 1; i < N; ++i) {
		JointLength[i] += JointLength[i - 1];
		maxMoney = max(maxMoney, (PipeTotalLen + JointLength[i])*(N - i));
	}

	cout << maxMoney << endl;
}

int main() {
	unsigned int pipeLen;

	while (cin >> N, N) {
		PipeTotalLen = 0;
		for (int i = 0; i < N; ++i) {
			cin >> pipeLen;
			PipeTotalLen += pipeLen;
		}
		JointLength[0] = 0;
		for (int i = 1; i < N; ++i) {
			cin >> JointLength[i];
		}
		solve();
	}
	

}

