#include #include int main() { int x, y, l; int total; int X, Y; int ycount, xcount; scanf("%d%d%d", &x, &y, &l); X = abs(x); Y = abs(y); if (Y%l == 0) ycount = Y / l; else ycount = Y / l + 1; if (X%l == 0) xcount = X / l; else xcount = X / l + 1; if (y >= 0) if (x == 0) total = ycount + xcount; else total = ycount + 1 + xcount; else total = 1 + xcount + 1 + ycount; printf("%d\n", total); return 0; }