#include <iostream>
#include <algorithm>

int n;
int pipes[65001];
int joints[65001];

int main() {
    while(std::cin >> n, n) {
        long long sum = 0, num = 1;

        for(int i = 0; i < n; ++i) {
            std::cin >> pipes[i];

            sum += pipes[i];
        }
        for(int i = 0; i < n - 1; ++i) {
            std::cin >> joints[i];

            sum += joints[i];
        }

        std::sort(joints, joints + n - 1);
        
        for(int i = 0; i < n - 1; ++i) {
            long long cp = sum - joints[i];
            
            if(cp * (num + 1) > sum * num) {
                sum = cp;
                ++num;
            }
        }

        std::cout << sum * num << std::endl;
    }
}