import math def main(): Xp, Yp = map(int, input().split()) r = math.hypot(Xp, Yp) d = int(r * 2 + 1) print(d) main()