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