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

typedef long long ll;
typedef pair<int, int> P;

#define pb push_back
#define in ,
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}


int main() {
  ll n;
  while(cin >> n) {
    if(n == 0) return 0;

    ll p[n], j[n - 1], na = 0, h = n;
    rep(i, 0, n) cin >> p[i], na += p[i];
    rep(i, 0, n - 1) cin >> j[i];

    sort(j, j + n - 1);
    ll ma = 0;
    rep(i, 1, n) {
      ma = max(ma, na * h);
      na += j[n - (i + 1)];
      h--;
    }

    ma = max(ma, na * h);
    cout << ma << endl;
  }
}