X=int(raw_input()) Y=int(raw_input()) L=int(raw_input()) Xabs=abs(X) Yabs=abs(Y) m=0 n=0 while Xabs>m*L: m+=1 while Yabs>n*L: n+=1 a=m+n if Y<0: a+=2 if X!=0: a+=1 print(a)