#include #include int main(void) { int X, Y, L; int t; scanf("%d", &X); scanf("%d", &Y); scanf("%d", &L); t = 0; if(X != 0)t++; if(X == 0 && Y < 0)t += 2; if(X != 0 && Y < 0)t += 1; X = abs(X); Y = abs(Y); t += X / L + ((X % L != 0)? 1 : 0); t += Y / L + ((Y % L != 0)? 1 : 0); printf("%d\n", t); return 0; }