#include int main(void){ int x,y,l; int op = 0; int step; scanf("%d %d %d", &x,&y,&l); if(x<0&&y<0){ op+=2; }else if(x!=0){ op+=1; }else if(y<0){ op+=2; } if(x<0){x*=-1;} if(y<0){y*=-1;} step = x/l; x = x - (step*l); if(x>0){step++;} op += step; step = y/l; y = y - (step*l); if(y>0){step++;} op += step; printf("%d\n", op); return 0; }