x, y = map(int, input().split()) print(int(2*(x**2 + y**2)**0.5)+1)