program main
  implicit none
  integer x,y,l
  integer ans
  read(*,*)x,y,l
  ans=ceiling(abs(dble(x)/l))+ceiling(abs(dble(y)/l))
  if(y>=0)then
  else
    ans=ans+1
  endif
  if(x/=0)ans=ans+1
  write(*,*)ans
end program main