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