The Khans of Barareh have always tried to keep the people away from technology. However, due to public dissatisfaction, they finally decided to build a cinema in Upper Barareh. Due to the deep-rooted differences between Upper Barareh and Lower Barareh, it was decided that movies would be screened separately for both groups.
The populations of Lower Barareh and Upper Barareh have always been equal, but after the recent Barareh war, the population of Upper Barareh is $a$ and the population of Lower Barareh is $b$, and all residents are interested in watching movies at the cinema. Given Shir-Farhad's family relationship with the residents of Upper and Lower Barareh, the cinema construction project has been entrusted to him. Since Shir-Farhad lacks the necessary competence for this task, his awakened conscience asks him to appoint Kianoush, the family's son-in-law, to this task.
The capacity of the cinema hall has not yet been determined, but we want to set it to a number like $c$. The Supreme Council of Barareh Order, in order to obstruct Kianoush's path toward modernization, has issued policies for the hall's capacity. In each screening, at most $c$ people can be inside the hall. Also, the total number of screenings must be the minimum possible. Furthermore, for each group, at least one screening must be completely full. Predictions indicate that the residents will come to the cinema and keep the tradition of queuing alive. On the other hand, due to the recent war, the larger group, fearing the "Hasht-baloo" (a local term for chaos/trouble), is not willing to have a smaller number of people in the queue than the smaller group.
Input
The first line of input contains two numbers $a$ and $b$, representing the population of Upper Barareh and Lower Barareh, respectively.
Output
Print the value $c$, which is the capacity of the cinema hall under the mentioned conditions, in a single line.
Constraints
$1 \le a, b \le 10^{18}$
Examples
Input 1
6 12
Output 1
6
Input 2
12 8
Output 2
8
Input 3
15 15
Output 3
15