from math import hypot, ceil x, y = map(int, input().split()) print(ceil(hypot(x, y)*2+10**-10))