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