import math x, y = [int(s) for s in input().split(' ')] length = math.sqrt(x ** 2 + y ** 2) diameter = int(length * 2) + 1 print(diameter)