#include <cstdio>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>

#define rep(i, j) FOR(i, 0, j)
#define FOR(i, j, k) for(int i = j; i < k; ++i)

using namespace std;

int main(){
  int  n, p, j[1000000];
  while(scanf("%d", &n),n){
    long long len = 0, num = n;
    rep(i, n){
      scanf("%d", &p);
      len += p;
    }
    rep(i, n - 1) scanf("%d", j + i);
    sort(j, j + n-1);

    for(int i = n - 2; i >= 0; i--){
      if((num-1)*(len+j[i]) < num*len) break;
      num--;
      len+=j[i];
    }
    printf("%lld\n", num*len);
  }
  return 0;
}