import math x,y=map(int, input().split()) print(math.floor(math.sqrt(x**2+y**2)*2)+1)