#include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair P; int main(){ ll x,y,l; cin >> x >> y >> l; ll ans = 0; int dir = 0; if(y > 0)ans+=ceil(double(abs(y))/l); if(x)ans+=ceil(double(abs(x))/l)+1,dir = 1; if(y < 0)ans+= 2-dir; cout << ans << endl; }