#include int main(){ int x, y, l, k, c=0; scanf("%d%d%d", &x, &y, &l); c = y > 0 && x != 0 ? 1 : 0; c = y < 0 ? 2 : c; x = x>0? x:-x; y = y>0? y:-y; for(k = 0; k < x;k+=l,c++); for(k = 0; k < y;k+=l,c++); if(x!=0) c++; printf("%d\n", c); return 0; }