#include #include #include #include #include #include #include using namespace std; int main() { int32_t x, y, l; cin >> x >> y >> l; int32_t ans = 0; ans += (abs(x) + l - 1) / l; ans += (abs(y) + l - 1) / l; if (x == 0) { ans += y < 0 ? 2 : 0; } else { ans += y < 0 ? 2 : 1; } cout << ans << endl; return 0; }