#include int main(void) { // your code goes here int x, y, l, m; scanf("%d", &x); scanf("%d", &y); scanf("%d", &l); if(x==0 && y>0){ m= (int)ceil((double)y/(double)l); }else if(x==0 && y<0){ m= (int)ceil(fabs((double)y)/(double)l) + 2; }else if(y==0){ m= (int)ceil(fabs((double)x)/(double)l) + 1; }else if(y>0){ m= (int)ceil(fabs((double)x)/(double)l) + (int)ceil(fabs((double)y)/(double)l) + 1; }else if(y<0){ m= (int)ceil(fabs((double)x)/(double)l) + (int)ceil(fabs((double)y)/(double)l) + 2; } if(x==0 && y==0){ m= 0; } printf("%d\n", m); return 0; }