#include #include int main(){ int x,y,l; scanf("%d %d %d",&x,&y,&l); int res = 0; if((0 < x && 0 < y) || (x < 0 && 0 <= y)){ res++; } else if((x < 0 && y <= 0) || (x <= 0 && y < 0)){ res+=2; } res += (int)ceil(fabs((double)x)/l); res += (int)ceil(fabs((double)y)/l); printf("%d\n",res); return 0; }