#include #include int main(void) { int x,y,l,s=0; scanf("%d%d%d",&x,&y,&l); if(y<0)s+=2; if(x!=0&&y>=0)s++; s+=fabs(x)/l; s+=fabs(y)/l; if((int)fabs(x)%l)s++; if((int)fabs(y)%l)s++; printf("%d",s); return 0; }