Problem: 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

Solution (in PYTHON):

Solution:
a = input()
b = input()
if a>b:
	m = a
	n = b
else:
	n = a
	m = b
if m==n or n==1:
	print 1
else:
	while n > 0:
		m = m/2 + 1
		n -= 1
	print m