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