#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <map>
#include <vector>
#include <string>
#include <sstream>
using namespace std;

int main()
{
    int n;
    while(cin >> n, n){
      vector<int> j(n-1);
      long long int len = 0, ans = -1;
      for(int i = 0; i < n; ++i){
          int temp;
          cin >> temp;
          len += temp;
      }
      for(int i = 0; i < n - 1; ++i) cin >> j[i];
      sort(j.begin(), j.end(), greater<int>());
      
      ans = len * n;
      
      for(int i = 1; i < n; ++i){
          len += j[i-1];
          ans = max(ans, len * (n - i));
      }
      
      cout << ans << endl;
    }
}