from math import sqrt,floor a,b=map(int,input().split()) a=sqrt(a**2+b**2) print(floor(2*a+1))