#include #include #include #include #include using namespace std; int main(){ long long X,Y,L,ans=0; cin >> X >> Y >> L; if(Y<0){ Y*=-1; if(X==0) ans+=2; else ans++; } if(X<0) X*=-1; if(X>0) ans++; if(Y>0) ans++; ans += ((X-1)/L)+((Y-1)/L)+1; cout << ans; return 0; }