X=int(input()) Y=int(input()) L=int(input()) x=abs(X) y=abs(Y) if Y>=0 and X==0: print(y//L) elif Y>=0 and X>0: print(1+y//L+x//L) else: print(2+y//L+x//L)