P10966 [HackerEarth] problem 2 2
普及
题目描述

Julia has a sack full of red and yellow balls and wants to arrange them in a particular order as

defined below.

Let us consider two definitions -

Chroma-regularity - maximum number of objects of the same color that appear consecutively.

Min-Arrangement - An arrangement of the objects with minimum Chroma Regularity possible.

Given a sack full of only red and yellow balls find the required min-arrangement.

(Input – x and y one after the other and -1 or 0 to end

Output – one single integer)

SAMPLE INPUT
10
10

SAMPLE OUTPUT
1

输入格式

见题面

输出格式

见题面

样例输入
10 10 SAMPLE
样例输出
1