import math x,y = map(int, raw_input().split()) print int(2 * math.sqrt(x ** 2 + y ** 2)) + 1