A,B,C=map(int,input().split()) from math import isqrt K=isqrt(B**2-4*A*C) if A>0: l=(-B-K)//(2*A) r=(-B+K)//(2*A) else: l=(B-K)//(2*abs(A)) r=(B+K)//(2*abs(A)) if A>0: if B**2-4*A*C==K**2 and (-B+K)%(2*A)==0: r-=1 if B**2-4*A*C!=K**2 and (-B-K)%(2*A)==0: l-=1 else: if B**2-4*A*C==K**2 and (B+K)%(2*abs(A))==0: r-=1 if B**2-4*A*C!=K**2 and (B-K)%(2*abs(A))==0: l-=1 print(r-l)