There are n pandas numbered from 1 to n, i-th of them has a_i donuts. There are also n bins numbered from 1 to n, i-th of them can hold b_i donuts. For any i from 1 to n, i-th panda can distribute his donuts to i-th and (imodn+1)-th bin.
Can you find a way to maximize the number of distributed donuts?
The input contains zero or more test cases, and is terminated by end-of-file. For each test case:
The first line contains an integer n (3≤n≤106).
The second line contains n integers a_1,a_2,…,a_n (0≤a_i≤109).
The third line contains n integers b_1,b_2,…,b_n (0≤b_i≤109).
It is guaranteed that the sum of all n does not exceed 106.
For each test case, output an integer which denotes the maximum number of distributed donuts.