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