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