/** * author: boutarou * created: 02.08.2020 12:12:07 **/ #include using namespace std; #define rep(i,n) for(int i = 0; i < int(n); i++) using ll = long long; using P = pair; int main() { ll x, y, l; cin >> x >> y >> l; int ans = 0; if (x != 0) { x = abs(x); ans += 1 + (x + l - 1) / l; } if (y > 0) ans += (y + l - 1) / l; if (y < 0) ans += 1 + (-y + l - 1) / l; if (y < 0 && x == 0) ans++; cout << ans << endl; return 0; }