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