Bitaro, a warrior of the Lemon Kingdom, wants to increase his level by challenging dungeons.
There are dungeons. The difficulty of dungeon is represented by two integers and . If Bitaro challenges dungeon at level , the result is as follows.
Each dungeon can be challenged at most once. Bitaro may choose the order of the dungeons and may stop at any time.
Bitaro's current level is . Find the maximum level he can reach after challenging dungeons.
The input is given from Standard Input in the following format:
Print the maximum level Bitaro can reach.
By challenging dungeons , , and in this order, Bitaro's level becomes , , and , respectively.
| 4 | 38 | No additional constraints. |