x, y ,l= int(input()), int(input()),int(input()) turn = 0 if(y < 0): turn+=2 else: turn+=1 if(abs(y)%l==0): turn+=abs(y)//l else: turn+=abs(y)//l+1 if(abs(x)%l==0): turn+=abs(x)//l else: turn+=(abs(x)//l+1) if(x==0): turn-=1 print(turn)