#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
  for(;;){
    int n;
    cin >> n;
    if(n==0) break;
    unsigned long psum = 0;
    for(int i=0; i<n; i++){
      int p;
      cin >> p;
      psum += p;
    }
    vector<int> j(n-1);
    for(int i=0; i<n-1; i++) cin >> j[i];
    sort(j.rbegin(),j.rend());
    int num = n;
    for(int i=0; i<n-1; i++){
      if(psum * num >= (psum + j[i]) * (num - 1)) break;
      psum += j[i];
      num--;
    }
    cout << psum * num << endl;
  }
  return 0;
}