#include #include using namespace std; int main(){ int X, Y, L; cin >> X >> Y >> L; int result; //count turn if(Y < 0){ result = 2; } else if(X == 0){ result = 0; } else{ result = 1; } result += ceil((double) abs(X) / L); result += ceil((double) abs(Y) / L); cout << result << endl; }