def BinarySearch(yes, no): while abs(yes - no) != 1: mid = (yes + no)//2 if mid ** 2 > 4 * (a ** 2 + b ** 2): yes = mid else: no = mid return yes a, b = map(int, input().split()) print(BinarySearch(10 ** 9, -1))