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