X,Y,L=map(int,(input(),input(),input())) a=0 if X!=0: X=max(X,-X) a+=1#rot a+=X//L+(X%L!=0)#move elif Y<0: a+=1#rot if Y<0: Y=-Y a+=1#rot a+=Y//L+(Y%L!=0)#mov print(a)