#include using namespace std; using ll=long long; ll upfloor(ll x, ll m) { ll r=(x%m+m)%m; return (x-r)/m+(bool)(x%m); } int main() { ll x,y,l;cin>>x>>y>>l; ll idou=upfloor(abs(x),l)+upfloor(abs(y),l); ll kai; if(y>=0&&x==0)kai=0; else if(y>=0)kai=1; else kai=2; cout<