PROGRAMMING:Ln home
As we all know, LN is a road maniac. Today he wants to study in d302, but he can't find his way (he also wants to spend the least effort). At this time, his kind-hearted teammates lty and xwl want to help him.
Lty marks a number of points on the map. These points are grouped in pairs, and only need to go to one of the two points at a time.
But ln is a real road maniac. He only knows to go ahead. At this time, xwl will let him go to the road with less effort, but at the same time, it will also spend a little more effort.
Although his teammates are so enthusiastic to help, LN is very lazy. If he is very tired at 302, he doesn't want to go. He wants you to help him figure out how much effort it takes to go to 302( If it's too much, he won't go.)
Ln will come out at the beginning, that is, it will take the effort to reach the first point (0, 0)
###Input format:
Enter n in the first line to indicate how many groups of points there are (one group of two)( n <= 25000)
The next two lines represent the effort taken to get here from the previous step, and the top and bottom correspond to a group( Data separated by spaces)
###Output format:
Output an integer to represent how much effort it takes to go to 302.
###Input example:
Here is a set of inputs. For example:
```in
three
2 5 2
1 2 8
```
###Output example:
The corresponding output is given here. For example:
```out
eight
```
answer:If there is no answer, please comment
Lty marks a number of points on the map. These points are grouped in pairs, and only need to go to one of the two points at a time.
But ln is a real road maniac. He only knows to go ahead. At this time, xwl will let him go to the road with less effort, but at the same time, it will also spend a little more effort.
Although his teammates are so enthusiastic to help, LN is very lazy. If he is very tired at 302, he doesn't want to go. He wants you to help him figure out how much effort it takes to go to 302( If it's too much, he won't go.)
Ln will come out at the beginning, that is, it will take the effort to reach the first point (0, 0)
###Input format:
Enter n in the first line to indicate how many groups of points there are (one group of two)( n <= 25000)
The next two lines represent the effort taken to get here from the previous step, and the top and bottom correspond to a group( Data separated by spaces)
###Output format:
Output an integer to represent how much effort it takes to go to 302.
###Input example:
Here is a set of inputs. For example:
```in
three
2 5 2
1 2 8
```
###Output example:
The corresponding output is given here. For example:
```out
eight
```
answer:If there is no answer, please comment