Byteocircle

No attempts yetTime limit1sMemory limit128 MB

Problem

Byteocircle is a country of nn cities numbered 00 through n1n-1. Exactly n1n-1 of them lie on a circle, and walking around it you meet cities 1,2,,n11, 2, \ldots, n-1 in that order. Every two neighbouring cities on the circle are joined by a two-way road. The capital, city 00, sits at the centre of the circle and has a road to every other city.

The travel time along each road is known. The government wants to make travelling between cities easier, so it will pick the two cities that are farthest apart and build an airport in each of them. The distance between two cities is the travel time of the fastest route from one to the other.

Input

The first line contains the number of cities nn. (3n5000003 \le n \le 500\,000)

The second line contains n1n-1 positive integers. The ii-th of them is the travel time of the road between city ii and the next city on the circle. The city that follows city n1n-1 is city 11.

The third line contains n1n-1 positive integers. The ii-th of them is the travel time of the road between the capital and city ii.

The travel times of all roads add up to at most 10910^9.

Output

Print one integer, the travel time between the two farthest cities.

Hint

In the example the two farthest cities are city 22 and city 44, and the travel time between them is 77. The airports belong in those two cities.