#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b A){ ll L = A.size(); FOR(i, 0, L){ if(i) cout << ' '; cout << A[i]; } cout << endl; } int main(){ cin.tie(0); ios::sync_with_stdio(false); ll X, Y, L; cin >> X >> Y >> L; if(X<0){ X *= -1; } ll ans = 0; // direction if(X!=0) ans++; if(Y<0) ans++; if(X==0 && Y<0) ans++; // distance ans += (X+L-1)/L; ans += (abs(Y)+L-1)/L; p(ans); return 0; }