#include #include int main(void){ long int x,y,l; long int n=0; scanf("%ld",&x); scanf("%ld",&y); scanf("%ld",&l); if(x < 0){ n++; } if( x != 0){ n += (abs(x)-(abs(x)%l))/l; n += (x%l)?1:0; } if(y < 0){ n+=2; } if(y != 0){ n += (abs(y)-(abs(y)%l))/l; n += (y%l)?1:0; } printf("%ld\n",n); return 0; }