x, y = map(int, input().split()) d = (x ** 2 + y ** 2) ** 0.5 print(int(d * 2 + 1))