while 1:a,b=map(int,raw_input().split());print"%.f"%(((4*a*a+3*b*b)**.5-a)/3)