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