#include #include int main() { long int x; long int y; long int l; int count=0; long int tmp; double k; scanf("%ld %ld %ld",&x,&y,&l); if(x>0 && y>0){ count++; } else if(x>0 && y<=0){ count+=2; } else if(x<0 && y>=0){ count++; } else{ count+=2; } //距離の計算 count += (int)ceil(fabs((double)y)/l); count += (int)ceil(fabs((double)x)/l); printf("%d\n",count); return 0; }