# No.98 円を描こう xp, yp = [int(i) for i in input().split()] print(int((xp ** 2 + yp ** 2) ** 0.5 * 2) + 1)