#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  while(1){
    cin >> n;
    if(n == 0) break;

    unsigned int p = 0,ptmp;
    int j[65000];

    for(int i = 0;i < n;i++){
      scanf("%d",&ptmp);
      p += ptmp;
    }
    for(int i = 0;i < n-1;i++) scanf("%d",&j[i]);

    sort(j,j+n-1,greater<int>());

    int ntmp = n;

    for(int i = 0;i < n-1;i++){
      if(p * ntmp <= (p+j[i]) * (ntmp-1)){
        ntmp--;
        p += j[i];
      }else{
        break;
      }
    }
    cout << p * ntmp << endl;
  }
  return 0;
}





