import math Xp, Yp = map(int, raw_input().split()) A = math.sqrt(Xp ** 2 + Yp ** 2) print int(2 * A + 1)