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