#include #include #include using namespace std; using ll = long long; int main() { int x, y, l; scanf("%d %d %d", &y, &x, &l); int opes = 0; opes += (max(0, x) + l - 1) / l; opes += x < 0 || y != 0; opes += abs(y) / l; opes += x < 0; opes += (max(0, -x) + l - 1) / l; printf("%d\n", opes); }