You are given N destinations that must be covered in N days in any order. Any ith (1≤i≤N) destination can be traveled on any jth (1≤j≤N) day. There are only two ways to reach any destination and that is by cars or buses. The cost of reaching to the ith destination by cars (C1,C2,.....Cn) and buses (B1,B2,.....Bn) are given.
The only constraint is that you cannot use the same way of travel on two consecutive days. Determine the minimum total cost that you need to pay in reaching all N destinations.
Input format
Output format
Print the minimum total cost that you need to pay in reaching all N destinations.
Constraints
1≤N≤1051≤Ci, Bi≤109
We can go on two days by car i.e on first day and last day, and on the other three days by bus to get the minimum cost which is 29.