X=int(input()) Y=int(input()) L=int(input()) count=0 count+=((-(-abs(Y)//L))+(-(-abs(X)//L))) if (abs(X))!=0: if Y>=0: count+=1 else: count+=2 elif abs(X)==0 and Y<0: count+=2 print(count)