#include int main(void){ long int X, Y, L; long int order = 0; scanf("%ld", &X); scanf("%ld", &Y); scanf("%ld", &L); if(X != 0) order += 1; if(Y < 0) order += 2; if(X < 0) X = -1 * X; if(Y < 0) Y = -1 * Y; if(X % L) order += X / L + 1; else order += X / L; if(Y % L) order += Y / L + 1; else order += Y / L; printf("%ld\n", order); return 0; }