#include using namespace std; #define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i)) using ll = long long; using P = pair; using namespace std; int main() { int X, Y, L; cin >> X >> Y >> L; int ans = 0; if (Y >= 0) { ans += Y/L + bool(Y%L); if (X != 0) ans++; X = abs(X); ans += X/L + bool(X%L); } else { ans += 2; X = abs(X); ans += X/L + bool(X%L); Y = abs(Y); ans += Y/L + bool(Y%L); } cout << ans << endl; }