def main(): x, y = map(int, input().split()) r = (x ** 2 + y ** 2) ** (1 / 2) print(int(r * 2 + 1)) if __name__ == '__main__': main()