x=int(input()) y=int(input()) l=int(input()) if y>=0: ans=-(-y//l) if x:ans+=1+-(-abs(x)//l) else: ans=2+-(y//l)+-(-abs(x)//l) print(ans)