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