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