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