X,Y = [int(i) for i in input().split()] A = int(((X**2)+(Y**2))**0.5*2) print(A+1)